Write a complete C program to calculate change as follows The user .docx
1. Write a complete C program to calculate change as follows:
The user should enter the amount the customer owes and the
amount of money the customer paid. The program should
calculate and display the amount of change, as well as, how
many dollars, quarters, dimes, nickels and pennies to return to
the customer. Always assume that the customer paid either the
exact amount or more than the exact amount. Use functions to
get input from the user and to display the output. Only input and
output are to be written using functions! Run your program
with different data. Be sure to include various amounts to test
your logic. Attach a copy of the source code AND the output
for one run using the following data: Customer owes $56.06 and
paid $60.00.
Solution
code:
#include <stdio.h>
#include<conio.h>
float input();
void output(float);
int main()
{
float change=input();
output(change);
return 0;