Didn't add details. Totally common sense program.
By the way, I didn't use strings due to the fact that this is meant to be a learning-program.Code:#include <iostream>
#include <windows.h>
using namespace std;
int main()
{
double mpg;
double miles;
double costgas;
double extra;
cout<<"Welcome to the Trip Cost Calculator.\n\n";
Sleep(1000);
while(1){
cout<<"\n\nEnter the miles per gallon your car goes on: ";
cin>>mpg;
Sleep(1000);
cout<<"\n\nEnter the amount of miles you wish to venture during your trip: ";
cin>>miles;
Sleep(1000);
cout<<"\n\nThe miles you wish to venture are "<<miles<<" on a car that goes "<<mpg<<" miles per gallon.\n\n";
Sleep(1000);
cout<<"\n\nEnter the cost of each gallon of gas: ";
cin>>costgas;
Sleep(1000);
cout<<"The miles you wish to venture are "<<miles<<" on a car that goes "<<mpg<<" miles per gallon."<<" The total cost of the trip will be "<<((miles/mpg)*costgas)<<" dollars before extra expenses.\n\n";
Sleep(1000);
cout<<"Enter the extra expenses you will encounter during the trip: ";
cin>>extra;
Sleep(1000);
cout<<"\n\nThe total cost will be "<<((miles/mpg)*costgas)+extra<<" dollars. Hopefully, this amount is very low and you will have lots of fun at your destination! Have fun!\n\n";
}
}