Question: Step 1 . Within main ( ) input wages, taxable interest, unemployment compensation, status ( 0 = dependent, 1 = single, and 2 = married

Step 1. Within main() input wages, taxable interest, unemployment compensation, status (0=dependent, 1=single, and 2=married), and taxes withheld as integers.
Step 2(15 pts). Complete the CalcAGI() function. Calculate the adjusted gross income (AGI) that is the sum of wages, interest, and unemployment. Convert any negative values to positive before summing to correct potential input errors. Return the AGI. Note the provided code in main() calls CalcAGI() and outputs the returned value. Submit for grading to confirm two tests pass.
Ex: If the input is:
20000235001400
The output is:
AGI: $20523
Ex: If input is:
641549917
the output is:
Minimum: 1 Maximum: 99 Mean: 21.7

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!