#include<iostream.h>
using std::cout;
using std::endl;
main()
{
// declaration of variables..........
char model,name[15], car#[15];
int days, amount, rentalAmount=0;
// little description and prompt the user user to type the input..
cout" Please provide the customer Name: " endl;
cin>> name;
cout" Please provide the Car Model Description. " endl;
cout"\t Enter 'A' for Model 2009. " endl;
cout"\t Enter 'B' for Model 2010. " endl;
cout"\t Enter 'C' for Model 2011. " endl;
cin>> model;
cout " Please provide the following information : " endl;
cout" Car No. : " endl;
cin>> car#;
cout" Number of day's : " endl;
cin>> days;
if (model == 'A')
{
amount = 5000;
model = 2009;
rentalAmount = (amount * days);
cout"======================================" endl;
cout"Customer Name :" name;
cout"\n""Car Model :" model ;
cout"\n""Number of days :" days;
cout"\n""Your Rental Amount is :" rentalAmount ;
cout"\n""======================================" endl;
break;
}
else if (model == 'B')
{
amount = 8000;
model = 2010;
rentalAmount = (amount * days);
cout"======================================" endl;
cout"Customer Name :" name;
cout"\n""Car Model :" model ;
cout"\n""Number of days :" days;
cout"\n""Your Rental Amount is :" rentalAmount ;
cout"\n""======================================" endl;
break;
}
else if (model == 'C')
{
amount = 10000;
model = 2011;
rentalAmount = (amount * days);
cout"======================================" endl;
cout"Customer Name :" name;
cout"\n""Car Model :" model ;
cout"\n""Number of days :" days;
cout"\n""Your Rental Amount is :" rentalAmount ;
cout"\n""======================================" endl;
break;
}
}
No comments:
Post a Comment