Answer:
I am writing a C program:
#include <stdio.h> //to use input output functions
void printIt(double annual_in){ //function printIt
if(annual_in >90000) //check if the income is greater than 90000
printf("Congratulations. Doing great!"); //print this message if income value is greater than 90000
else //if annual income is less than 90000
printf("You WILL make $50,000, if you keep going"); } //print this message if income value is less than 90000
int main() //start of main() funciton body
{ double income; //declares a double type variable income to hold annual income value
printf("Enter annual income: "); //prompts user to enter annual income
scanf("%lf",&income); //reads income value from user
printIt(income); } // calls printIt method by passing input income to that function
Step-by-step explanation:
The program is well explained in the comments mentioned with each statement of the program. The flowchart is attached.
First flowchart flow1 has a separate main program flowchart which reads the income and calls printIt function. A second flowchart is of prinIt() method that checks the input income passed by main function and displays the corresponding messages and return.
The second flowchart flow2 is the simple flowchart that simply gives functional description of the C program as flowchart is not where giving function definitions is important. Instead of defining the function printIt separately for this C program, a high-level representation of functional aspects of this program is described in second flowchart while not getting into implementation details.