Question

SECTION B 80 MARKS QUESTION 1 12 marks Parents of the pupils of the Park Primary School must pay an amount for outfits for th

SECTION B 80 MARKS QUESTION 1 12 marks Parents of the pupils of the Park Primary School must pay an amount for outfits for th

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

solution:

given data:

1.

#include <iostream>

using namespace std;

int main()
{
int grade;
int fee;
bool leadrole;
bool roles2;
switch(grade){
case 1:
case 2: fee=45;break;
case 3:
case 4:
case 5: fee=65;break;
case 6:
case 7:{
if(!roles2){
if(leadrole){
fee=100;
}
else{
fee=70;
}
}
else{
fee=130;
}
break;
}
default: std::cout<<"Invalid grade";
}
  

return 0;
}

Screenshot of code

switch(grade) { case 1: case 2: fee=45; break; case 3: case 4: case 5: fee=65;break; case 6: case 7: { if(!roles2){ if(leadro

Sample test output

12 13 int main() 14- { 15 int grade=6; 16 int fee=0; 17 bool leadrole=true; 18 bool roles2=false; 19 switch(grade) { 20 case

please give me thumb up

Add a comment
Know the answer?
Add Answer to:
SECTION B 80 MARKS QUESTION 1 12 marks Parents of the pupils of the Park Primary...
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
  • 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...

  • 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...

  • 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...

  • 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 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 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 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 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...

  • 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...

  • A construction company pays its temporary workers R100 per day if they work on a Monday...

    A construction company pays its temporary workers R100 per day if they work on a Monday to Saturday and R200 if they work on a Sunday. They only work when the company contacts them, so they do not work the whole month. Complete the program below that asks the user to enter the days that the worker has worked. The character 'l' is entered if the day is Monday to Saturday and 2’ if it is a Sunday. A total...

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