Consider the scenorio in which a colleg\'s percent budget increase is determined
ID: 3586642 • Letter: C
Question
Consider the scenorio in which a colleg's percent budget increase is determined by the number of student who graduated the prior year. create a console application that prompts the user for the number of graduated students and old budget for specific college. use the number of graduated students to determine the annual budget percentage increase, then calculate the new budget in dollars. the program must run all of the lited test cases of number of graduated students and new budget in one execution. use an array to store the input values. assume that the maximum number of graduated students is 1500. the number of graduated students must be greater than or equal to zero. if less than zero, reprompt for that number again.
Run your application with the following data
#Students ____________old budget
250__________________$700,000
-300 replace with 501 ____$650,000
1001_________________ $850,000
1501 _________________$1,200,000
251 __________________$1,000,000
Explanation / Answer
#include<iostream>
#include<iomanip>
using namespace std;
int main(){
int n;
double old_budget;
double new_budget;
do {
cout << "Enter number of students graduated:";
cin >> n;
if (n > 1500 || n < 0)
cout << "Error: Valid range is 0-1500 ";
} while (n > 1500 || n < 0);
cout << "Enter old budget:";
cin >> old_budget;
new_budget = old_budget + (n/100) * old_budget;
cout << fixed;
cout << setprecision(2) << "New budget : " << new_budget << endl;
return 0;
}