Guys, can you help me with my project
I can't see what's wrong with my program.
The errors are:
Line 138: Expected primary-expression before "int"
Line 138: Expected ';' before "int"
Line 158: Expected '}' at end of input
#include<iostream>
using namespace std;
int telephone_bill()
{ int choice, min, tbill, coun, con;
cout<<"Welcome to Telephone Bill Service!";
cout<<"\nChoose if\n <1>Local Call <2>International Call";
cout<<"\nYour choice:";
cin>>choice;
if (choice==1)
{system("cls");
cout<<"\nThe rate for Local Call is 3.00PhP.";
cout<<"\nHow many minute(s):";
cin>>min;
tbill=min*3.00;
cout<<"\nYour total Telephone Bill is "<< tbill<<".00";
}
else if (choice==2)
{system("cls");cout<<"\nChoose a country:";
cout<<"\n1. America\t\t2.Europe\n3.Australia\t\t4.Singapore";
cout<<"\nCountry:";
cin>>coun;
if (coun==1)
{system("cls");cout<<"\nThe rate for call to America is 10.00.";
cout<<"\nHow many minute(s):";
cin>>min;
tbill=min*10.00;
cout<<"\nYour total Telephone Bill is "<<tbill<<".00";
}
else if (coun==2)
{system("cls");cout<<"\nThe rate for call to Europe is 12.00.";
cout<<"\nHow many minute(s):";
cin>>min;
tbill=min*12.00;
cout<<"\nYour total Telephone Bill is "<<tbill<<".00";
}
else if (coun==3)
{system("cls");cout<<"\nThe rate for call to Australia is 8.00.";
cout<<"\nHow many minute(s):";
cin>>min;
tbill=min*8.00;
cout<<"\nYour total Telephone Bill is "<<tbill<<".00";
}
else if (coun==4)
{system("cls");cout<<"\nThe rate for call to Singapore is 6.00.";
cout<<"\nHow many minute(s):";
cin>>min;
tbill=min*6.00;
cout<<"\nYour total Telephone Bill is "<<tbill<<".00";
}
else
{system("cls");cout<<"\nError!";
}
}
else
{cout<<"\nError!";
cout<<"\nProgram Terminated.";
}
}
int electric_bill()
{ int kw, ebill,ebill1,disc,balance,k;
cout<<"Welcome to Electric Billing Service!";
cout<<"\n\nThe rate of electric per kilowatt hour is 5.00.";
cout<<"\n\nEnter your Electric Consumption:";
cin>>kw;
ebill1=kw*5.00;
if (kw>=500)
{cout<<"\n\nYou have 10% Discount on your total bill!";
disc=(ebill1*.10);
ebill=(ebill1-disc);
cout<<"\nYou have discount of "<<disc<<".00";
cout<<"\n\nYour Electric Bill with Discount is "<<ebill1<<".00";
}
else
{cout<<"\nSorry You don't have discount.";
disc=0;
cout<<"\nYour Total Electric is "<<ebill1<<".00";
}
cout<<"\n\nDo you have any balance on your last bill?";
cout<<"\n<1>Yes\t<2>No\n";
cout<<"Your Choice:";
cin>>k;
if (k==1)
{cout<<"\n\nYour ramaining balance:";
cin>>balance;
ebill=(ebill1+balance)-disc;
cout<<"\n\nYour total Electric bill is "<<ebill<<".00";
}
else if (k==2)
{ebill=ebill1-disc;
cout<<"Your Total Bill is "<<ebill<<".00";
}
else
{cout<<"\n\nError!";
}}
int water_bill()
{ int wat, wbill, wbill1, discount, bal, q;
cout<<"Welcome to Water Billing Services!";
cout<<"\n\nThe rate for water is 3.00.";
cout<<"\n\nEnter your Water Consumption:";
cin>>wat;
wbill1=wat*3.00;
if (wat>=500)
{cout<<"\n\nYou have a 10% Discount on your bill!";
discount=wbill1*.010;
cout<<"\n\nYour bill is "<<wbill1<<".00";
cout<<"\nYou've discounted by "<<discount<<".00";
}
else
{cout<<"\n\nSorry, You don't have discount.";
discount=0;
cout<<"\n\nYour bill is "<<wbill1<<".00";
}
cout<<"\n\nDo you have any balance on your last bill?";
cout<<"\n<1>Yes\t<2>No\n";
cout<<"Your Choice:";
cin>>q;
if (q==1)
{cout<<"\n\nYour ramaining balance:";
cin>>bal;
wbill=(wbill1+bal)-discount;
cout<<"\n\nYour total Water bill is "<<wbill<<".00";
}
else if (q==2)
{wbill=wbill1-discount;
cout<<"Your Total Bill is "<<wbill<<".00";
}
else
{cout<<"\n\nError!";
}
int main()
{ int a;
cout<<"Welcome to Bayad Center!";
cout<<"\nPlease choose a service:";
cout<<"\n<1>Telephone Billing Service\n<2>Electric Billing Service\n<3>Water Billing Service\n<4>Exit";
cout<<"\nYour Choice:";
cin>>a;
switch (a)
{ case 1: system("cls");system("Color 3D");telephone_bill();
break;
case 2: system("cls");system("Color 3C");electric_bill();
break;
case 3: system("cls");system("Color 4E");water_bill();
break;
case 4: system("cls");system("Color 9F");cout<<"\nProgram Terminated.";
break;
default: cout<<"\nError!";
}
system("Pause");
return 0;
}