What must be the PSEUDOCODE for the C++ program below? #include using namespace std; int main(){ int days, guests, children_below_4; float total; cout << "Welcome to Sy Residences! \n"; cout << "Please enter the number of days that you will stay: "; cin >> days; cout << "Number of Guests: "; cin >> guests; cout << "Number of children below 4 years old: "; cin >> children_below_4; if((guests-children_below_4)<=4){ total = (3000*days); }else{ total = (3000*days) + ((guests-children_below_4-4)*500*days); } if(days>=30){ total = total*0.8; }else if(days>=15 && days<30){ total = total*0.85; }else if(days>=7 && days<15){ total = total*0.9; }else{ total = total; } cout<<"-----------------------------------------------------\n"; cout<< "Total amount that the guest will pay: " <
What must be the PSEUDOCODE for the C++
#include <iostream>
using namespace std;
int main(){
int days, guests, children_below_4;
float total;
cout << "Welcome to Sy Residences! \n";
cout << "Please enter the number of days that you will stay: ";
cin >> days;
cout << "Number of Guests: ";
cin >> guests;
cout << "Number of children below 4 years old: ";
cin >> children_below_4;
if((guests-children_below_4)<=4){
total = (3000*days);
}else{
total = (3000*days) + ((guests-children_below_4-4)*500*days);
}
if(days>=30){
total = total*0.8;
}else if(days>=15 && days<30){
total = total*0.85;
}else if(days>=7 && days<15){
total = total*0.9;
}else{
total = total;
}
cout<<"-----------------------------------------------------\n";
cout<< "Total amount that the guest will pay: " <<total;
return 0;
}
Trending now
This is a popular solution!
Step by step
Solved in 2 steps