develop a program that calculates and displays the total travel expences of a bussiness person on a trip. the program should have functions that ask for and return the following:
- the total number of days spent on the trip
- the time of departure on the first day of the trip. and the time of arrival back home on the last day of the trip.
- miles driven, if a private vehicle was used. calculate the vehicles expences as 0.25 per miles driven.
- parking fees (the company allows up to $6 per day. anything in excess of this must be paid by the employee. )
- taxi fee, if a taxi was used anytime during the trip (the company allows up to $5 per day, for each day a taxi was used. anything in excess of this must be paid by the employee.)
- conference or seminar registration fees.
- hotel expences (the company allow up to $90 per night for lodging. anything in excess of this must be paid by the employee. )
- the amount for meal eating.
the program should calculate and display the total expences incurred.
1
Expert's answer
2012-01-06T07:12:04-0500
#include <iostream> #include <string> #include <conio.h> using namespace std;
float price=0, money=0;
void count(){ int totalnumberofdays; cout<<"Enter the total number of days spent on the trip: "; cin>>totalnumberofdays;
string timeofdeparture, timeofarrival; cout<<"Enter time of departure on the first day of the trip: "; cin>>timeofdeparture; cout<<"Enter time of arrival back home on the last day: "; cin>>timeofarrival;
int miles; cout<<"Enter the number of miles driven, if a private vehicle was used (else type 0): "; cin>>miles; price = price + miles*0.25; money = money + miles*0.25;
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment