Question

Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include <iostream>

using namespace std;

int main() {

int grade = 6; // Intializing grade and assigning value to grade

bool leadrole = false; // Intializing leadrole

bool roles2=true; // Intializing roles2

// Running Switch control statement

switch(grade) {

// Executes Case 1 if grade is 1

case 1 :

cout<<"The amoount has been paid:45"<<endl;

break;

// Executes Case 2 if grade is 2

case 2 :

cout<<"The amoount has been paid:45"<<endl;

break;

// Executes Case 3 if grade is 3

case 3 :

cout<<"The amoount has been paid:65"<<endl;

break;

// Executes Case 4 if grade is 4

case 4 :

cout<<"The amoount has been paid:65"<<endl;

break;

// Executes Case 5 if grade is 5

case 5 :

cout<<"The amoount has been paid:65"<<endl;

break;

// Executes Case 6 if grade is 6

case 6 :

// IF condition to check if playing Lead role

if(leadrole) {

cout<<"The amoount has been paid:100";

break;

}

// Else IF condition to check if playing 2 roles

else if(roles2) {

cout<<"The amoount has been paid:130";

break;

}

// Else condition to check if not playing any of eading or 2 roles

else {

cout<<"The amoount has been paid:70";

break;

}

// Executes Case 7 if grade is 7

case 7 :

// IF condition to check if playing Lead role

if(leadrole) {

cout<<"The amoount has been paid:100";

break;

}

// Else IF condition to check if playing 2 roles

else if(roles2) {

cout<<"The amoount has been paid:130";

break;

}

// Else condition to check if not playing any of eading or 2 roles

else {

cout<<"The amoount has been paid:70";

break;

}

default: cout<<"No data";

break;

}

}

1 > clang++-7 pthread -std=c++17 -o main main.cpp 3 -/main The account has been paid:130 4 6 7 8 9 le 12 13 14 15 16 main.cpp

Add a comment
Know the answer?
Add Answer to:
Parents of the pupils of the Park Primary School must pay an amount for outfits for...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Parents of the pupils of the Park Primary School must pay an amount for outfits for...

    Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade 0 pupils. The amount that the parents have to pay is calculated as follows: • The cost of the outfits for Grade 1 and 2 pupils is R45 • The cost of the outfits for Grades 3 to 5 is R65 • Grade 6 and 7 pupils may play one or...

  • Parents of the pupils of the Park Primary School must pay an amount for outfits for...

    Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade 0 pupils. The amount that the parents have to pay is calculated as follows: The cost of the outfits for Grade 1 and 2 pupils is R45 The cost of the outfits for Grades 3 to 5 is R65 Grade 6 and 7 pupils may play one or two roles. If...

  • Parents of the pupils of the Park Primary School must pay an amount for outfits for...

    Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade 0 pupils. The amount that the parents have to pay is calculated as follows: • The cost of the outfits for Grade 1 and 2 pupils is R45 • The cost of the outfits for Grades 3 to 5 is R65 • Grade 6 and 7 pupils may play one or...

  • QUESTION 1 12 marks Parents of the pupils of the Park Primary School must pay an...

    QUESTION 1 12 marks Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade O pupils. The amount that the parents have to pay is calculated as follows: The cost of the outfits for Grade 1 and 2 pupils is R45 The cost of the outfits for Grades 3 to 5 is R65 Grade 6 and 7 pupils may play one...

  • Parents of the pupils of the Park Primary School must pay an amount for outfits for...

    Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade 0 pupils. The amount that the parents have to pay is calculated as follows: The cost of the outfits for Grade 1 and 2 pupils is R45 The cost of the outfits for Grades 3 to 5 is R65 Grade 6 and 7 pupils may play one or two roles. If...

  • QUESTION 2 [12] Parents of the pupils of the Park Primary School must pay an amount...

    QUESTION 2 [12] Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade 0 pupils. The amount that the parents have to pay is calculated as follows: . The cost of the outfits for Grade 1 and 2 pupils is R45. The cost of the outfits for Grades 3 to 5 is R65. Grade 6 and 7 pupils may play one...

  • SECTION B 80 MARKS QUESTION 1 12 marks Parents of the pupils of the Park Primary...

    SECTION B 80 MARKS QUESTION 1 12 marks Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade O pupils. The amount that the parents have to pay is calculated as follows: The cost of the outfits for Grade 1 and 2 pupils is R45 The cost of the outfits for Grades 3 to 5 is R65 Grade 6 and 7...

  • SECTION B 80 MARKS QUESTION 1 12 marks Parents of the pupils of the Park Primary...

    SECTION B 80 MARKS QUESTION 1 12 marks Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade 0 pupils. The amount that the parents have to pay is calculated as follows: The cost of the outfits for Grade 1 and 2 pupils is R45 The cost of the outfits for Grades 3 to 5 is R65 Grade 6 and 7...

  • SECTION B 80 MARKS QUESTION 1 12 marks Parents of the pupils of the Park Primary...

    SECTION B 80 MARKS QUESTION 1 12 marks Parents of the pupils of the Park Primary School must pay an amount for outfits for the annual play. All pupils take part in the play, except the Grade 0 pupils. The amount that the parents have to pay is calculated as follows: The cost of the outfits for Grade 1 and 2 pupils is R45 The cost of the outfits for Grades 3 to 5 is R65 Grade 6 and 7...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT