Question: Complete the following exercises using C programming language. Take screenshots of the code and its output where specified and paste them into in a well-labeled
Complete the following exercises using C programming language. Take screenshots of the code and its output where specified and paste them into in a well-labeled Word document for submission.
Scenario
Assume you are the CIO of an organization with three different IT department locations with separate costs. You want a program to perform simple IT expenditure calculations. Your IT expenditure target is $35,000 per site.
Site expenditures: Site 1 $35,000. Site 2 $37,500. Site 3 $42,500.
Exercise 3 Calculating Monthly Expenses
Imagine you are the IT manager for Site 3 that had annual IT expenses of $42,500. Your site was above the target of $35,500 and you want to review your monthly expenses for each month of that year to determine in what months the over-expenditure occurred.
Write a program that:
- Calculates what the monthly target would be for each of the 12 months (assuming that the target is the same each month).
- Assigns the monthly target value to a variable called monthly_target
- Uses a For Loop to ask for the input of monthly expenditures for 12 months (make sure your total monthly expenditures add to the $42,500 annual expense).
- Compares the expense to the monthly target and uses an if statement to determine if the expense is Over, Under, or Exact to the monthly target for each entry.
- Creates a three-column display showing the month and the expense entered for that month and a third column that says Over, Under, or Exact (Text chapter 4, Program 4-11 can be helpful in showing how to program the display).
Save and run the program and take a screenshot of your code and the results of running the program and paste it into the Word document.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
