create a c++ program an internet cafe has 10,500.00 income per day. compute the total income within 30 days within 4 quarters and within 1 year. the shop will pay P2599.00 for the internet, p10000.00 the electricity and p2500.00 the maintenance
#include <iostream>
#include <iomanip>
using namespace std;
int main(){
const double INCOME_PER_DAY=10500.00;
const double INTERNET=2599.00;
const double ELECTRICITY=10000.00;
const double MAINTENANCE=2500.00;
double totalIncome30=INCOME_PER_DAY*30-(INTERNET+ELECTRICITY+MAINTENANCE);
double totalIncome4Quarters=INCOME_PER_DAY*30*4-(INTERNET+ELECTRICITY+MAINTENANCE)*12;
double totalIncome1Year=INCOME_PER_DAY*365-(INTERNET+ELECTRICITY+MAINTENANCE)*12;
cout<<fixed<<"The total income within 30 days: P"<<setprecision(2)<<totalIncome30<<"\n";
cout<<"The total income within 4 quarters: P"<<setprecision(2)<<totalIncome4Quarters<<"\n";
cout<<"The total income within 1 year: P"<<setprecision(2)<<totalIncome1Year<<"\n";
cin>>totalIncome30;
//within 4 quarters and . "
return 0;
}
Comments
Leave a comment