//#include conio.h
//#include iomanip
//#include iostream
//#include string
using namespace std;
const string Zo;
double Sp;
double Li;
double Ti;
void main()
{
cout<<setiosflags(ios::fixed);
cout<<setprecision (2);
cout<<setw(22)<<"Speeding Ticket"<<endl;
cout<<"Please Enter Your Speed :";
cin>>Sp;
cout<<"Speed Limit:";
cin>>Li;
cout<<"IF School Zone Enter (Yes/No):";
cin>>"Yes"||"No";
if(Zo=="Yes")
Ti=30+6*(Sp-Li);
else
Ti=30+3*(Sp-Li);
if (Sp>=Li+30)
Ti=Ti+100;
cout<<"Your Speeding Ticket Is:"<<"$"<<Ti<<endl;
getch();
}
This wasn't my first trial on the first one it was cin>>Zo
but the teacher said find a better way so if the user input is wrong it would know. I am a beginner so I did as simply as I could.