Question: I need a PROGRAMMING FLOWCHART for my C++ code. Code: #include using namespace std; int main() { int nationality; int week, weekdays, weekends; int age,

I need a PROGRAMMING FLOWCHART for my C++ code.

I need a PROGRAMMING FLOWCHART for my C++ code. Code: #include using

Code:

#include

using namespace std;

int main()

{

int nationality;

int week, weekdays, weekends;

int age, tickets, persons, price, total_price;

persons = 1, total_price = 0;

cout

cout

cout

cout

cout

cin >> nationality;

if (nationality == 1) {

cout

cout

cin >> week;

switch (week) {

case 1:

cout

cout

cout

cout

cout

cout

cout

cin >> tickets;

cout

while (tickets >= persons) {

cout

cin >> age;

{

if (age

price = 15;

else if (age > 13 && age

price = 25;

else if (age >= 60)

price = 10;

}

total_price += price;

persons++;

}

cout

break;

case 2:

cout

cout

cout

cout

cout

cout

cout

cin >> tickets;

cout

while (tickets >= persons) {

cout

cin >> age;

{

if (age

price = 20;

else if (age > 13 && age

price = 30;

else if (age >= 60)

price = 10;

}

total_price += price;

persons++;

}

cout

break;

default:

cout

break;

}}

else if (nationality == 2) {

cout

cout

cin >> week;

switch (week) {

case 1:

cout

cout

cout

cout

cout

cout

cout

cin >> tickets;

cout

while (tickets >= persons) {

cout

cin >> age;

{

if (age

price = 25;

else if (age > 13 && age

price = 35;

else if (age >= 60)

price = 10;

}

total_price += price;

persons++;

}

cout

break;

case 2:

cout

cout

cout

cout

cout

cout

cout

cin >> tickets;

cout

while (tickets >= persons) {

cout

cin >> age;

{

if (age

price = 30;

else if (age > 13 && age

price = 40;

else if (age >= 60)

price = 10;

}

total_price += price;

persons++;

}

cout

break;

default:

cout

break;

}

return 0;

}}

3. ABC Danau Resort offers a water theme park for a family vacation and group events. Table 3 shows entrance fees to the resort. You are required to write a C++ program for the ticket counter as required. i. ii. iii. The program asks whether the visitors are Malaysian. The program asks whether it is a weekend or a weekday. The program asks how many senior citizens, adults, child visitors The program calculates the total ticket price The program displays the total ticket price. The program can be repeated until the user chooses to end or exit. iv. V. vi. TABLE 3 Ticket Weekdays Weekends Category With MyKad Others With MyKad Others Adult RM25 RM35 RM30 RM40 Child RM15 RM25 RM20 RM30 Gold Citizen RM10

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!