#include <iostream.h>
int main()
{
double bill, tip;
int split;
cout<<"enter your bill: ";
cin>>bill;
while (bill<0)
{
cout<<"You can't have a bill less than 1 cent. Enter your bill again: ";
cin>>bill;
}
cout<<"Enter the percent you want to tip with: ";
cin>>tip;
while(tip<0)
{
cout<<"You can't give negative tip percent. Enter tip percent again: ";
cin>>tip;
}
cout<<"enter how many people are splitting the bill: ";
cin>>split;
while(split<1)
{
cout<<"You can't pay with less than one person. Enter number of people again: ";
cin>>split;
}
cout<<endl;
cout<<"Your tip is: "<< bill (tip/100) << "dollars"<<endl;
cout<<"your total price is: "<< bill + (bill+tip/100) <<" dollars"<<endl;
cout<<"each person should pay: "<< (bill + (bill*tip/100) ) / split <<"dollars"<<endl;
system("Pause");
return 0;
}
It says the 1st line has an error and won't compile and run..here is the error
1 C:\Dev-Cpp\include\c++\3.4.2\backward\iostream.h:31, from C:\Users\NightJay0044\Desktop\tip1.cpp In file included from C:/Dev-Cpp/include/c++/3.4.2/backward/iostream.h:31, from C:\Users\NightJay0044\Desktop\tip1.cpp