Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE DON'T COPY FROM CHEGG By using C++ and functional programming (don't use while & for loops, must be in pure functions) Write a program

PLEASE DON'T COPY FROM CHEGG By using C++ and functional programming(don't use while & for loops, must be in pure functions)

Write a program that reads table with given columns from input stream. Columns are name(note: firstname and lastname are in one column, so use getline maybe), amount, debt. Then filter the table (condition: debt is equal to 0). After that increase debt by 42% then output the results.

Example.

User's Input: (The user should enter the data, so use cin)

3

Sam Smith 411889 36881

Angela Hill 121877 0

Nicholas Anderson 783887 591951

Output:

Sam Smith 411889 52371.02

Nicholas Anderson 783887 840570.42 Here is an example for a Pure function image text in transcribed

**Please also explain your answer**

Please understand what functional programming is before attempting the question.

Don't attempt this question again if you have before on Chegg.

int powFunc(int m, int n) { if (n == 0) return 1; return m * powFunc(m, n-1); } int read Int() { int n = 0; std::cin>>n; return n; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions