Question: Please write ONE program containing 5 functions. They should each match the function prototypes listed below. void printNumsBackwards ( int start, int end ) ;
Please write ONE program containing functions. They should each match the function prototypes listed below.
void printNumsBackwards int start, int end;
a Takes two integers, with 'start' being larger than 'end', and prints all the numbers in between. Ex printNumBackwards should print
b Your program should throw an error message and let the user reenter numbers until 'start' is larger than 'end'
float feetmeters float flength;
a Takes a singe float representing a length in feet as a parameter, returns a float representing that same length in meters
float metersfeet float mlength;
a Takes a single float representing a length in meters, returns a float representing that same length in feet
b For this function, I want you to use the returned value from feetmeters to verify that your math is being done correctly
int factorial int n ;
a Takes a single integer and returns the factorial of that number. Ex factorial should return
float average int a int b int c;
a Takes integers and returns the average of the three as a float. Ex average should return
Next write a main function which demonstrates that all are working properly by calling each of them with usersupplied values via scanf and printing the results.
I would like the main to be structured where you scan in values for the function except metersfeet run the function, and print the output before moving onto the next function. You should ONLY be doing scanf inside of main not in the functions. The ONLY function that should contain a printf is printNumBackwards.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
