Question
Problem summary: This program will keep track of purchases, total number of purchases and total amount spent relative to a budgeted amount of money for
Problem summary: This program will keep track of purchases, total number of purchases and total amount spent relative to a budgeted amount of money for these purchases. Your program will ask for user input for the budget and the purchase amounts until the budget is depleted. See below for more criteria all of which much be met for this assignment.
This program must meet the following criteria:
1. Comment statement with your name in the program & for each line of code that describes what the code does (e.g. declares the variables X, Y & Z as float)!!
2. The program must use either a while-loop or a do-while-loop to repeat the necessary code within the program until there is no money left in the budget (hint: This is your condition for the loop).
3.Prompts the user for the total amount budgeted for purchasing computer equipment & software (e.g. dollar amount like $6000... but without the $).
4. Prompts the user to input the purchase amount for the most recent expenditure.
5. Reports the following for each iteration/purchase (e.g. you will use four (4) separate variables for: purchase, count (total number of purchases), amount spent,& amount remaining). No calculations will be made in any print statement.
a. How many purchases there have been.
b. Amount of the most recent purchase.
c. Total amount of money spent so far.
d. How much money is left in the budget (e.g. if the budget is $6000 and there have been purchases of $500 and then $1000 the program should print that there have been 2 purchases for a total of $1500 spent and there is now $4500 remaining in the budget).
6. When the program ends it should send a message to the user that states that the budget has been depleted. If more money has been spent than was budgeted this should be reported too.
I am learning C programming and using Geany software.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started