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: " <

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

What must be the PSEUDOCODE for the C++ program below?

 

 

#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;

}

2. Sy residences owns 5 condominium units which is located to different cities in the Philippines.
The units are used to accommodate travelers from all over the world. Each unit has a base price
of 3,000 per night. Units are good for 4 persons only, however the guest can pay an extra
charge of 500 per person in excess. Children below 4 years old are free. Guests will be given 10%
discount for more than a week of stay. 15% for more than 15 days and 20% for a month. Write
a program that will ask the user to enter the number of days that the guest will stay, total
number of guests that will check in, number of children below 4 years old and display the total
amount that the user will pay.
Sample Output
Welcome to Sy Residences!
Please enter the number of days that you will stay: 5
Number of Guests: 5
Number of children below 4 years old: 0
Total Amount that the guest will pay: 17500
Transcribed Image Text:2. Sy residences owns 5 condominium units which is located to different cities in the Philippines. The units are used to accommodate travelers from all over the world. Each unit has a base price of 3,000 per night. Units are good for 4 persons only, however the guest can pay an extra charge of 500 per person in excess. Children below 4 years old are free. Guests will be given 10% discount for more than a week of stay. 15% for more than 15 days and 20% for a month. Write a program that will ask the user to enter the number of days that the guest will stay, total number of guests that will check in, number of children below 4 years old and display the total amount that the user will pay. Sample Output Welcome to Sy Residences! Please enter the number of days that you will stay: 5 Number of Guests: 5 Number of children below 4 years old: 0 Total Amount that the guest will pay: 17500
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY