Here is the program that I have to make:
Write a program that asks the user to enter the amount that he or she has budgeted for a month. A loop should then prompt the user to enter each of his or her expenses for the month, and keep a running total. When the loop fin ishes, the program should display the amount that the user is over or under budget.
This is what I have so far:
#include<iostream>
using namespace::std;
int main ()
{
int limit = 3000;
double monthly = 0,
budget,olimit,ulimit;
do{
cout<<"How much did you spend today? ";
cin>>budget;
if(budget < limit)
{
ulimit = limit - budget;
cout<<"You are below your maximum budget. ";
}
if(budget > limit)
{
olimit = budget - limit;
cout<<"You went over your limit in your budget. ";
}
monthly += budget;
}while (monthly <= 12);
return 0;
}
Can I get any help please? Thank you in advance :)