Need Flow Chart Algorithm Code Please Include Using Namespace Std Get Days Int Noofdays In Q37078058

I need a flow chart and algorithm for this code please.

#include <iostream>

using namespace std;

//get no of days
int noOfDays()
{
int days;
cout<<“nEnter the number of days spent: “;
cin>>days;

if(days<1){
cout<<“nInvalid input “;
noOfDays();
}

return days;

}

//get departure time
float timeOfDept()
{
float time;

cout<<“nEnter the time of departure in 24 hours format:”;
cin>>time;

if(!(time>=0.0 && time<25.00)){
cout<<“nInvalid input “;
timeOfDept();
}

return time;
}

//get arrival time
float timeOfArrival()
{
float time;

cout<<“nEnter the time of arrival in 24 hours format:”;
cin>>time;

if(!(time>=0.0 && time<25.00)){
cout<<“nInvalid input “;
timeOfArrival();
}

return time;
}

//get the air fare
double airfare()
{
double fare;
cout<<“nEnter the round trip airfare: “;
cin>>fare;

if(!(fare>0.0) ){
cout<<“nInvalid input “;
airfare();
}

return fare;
}

//get the car rent , if own vehicle get the miles driven
double carRent()
{
double rent, miles;

cout<<“nEnter the amount of car rent, if private vehicleused enter 0:

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.