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

please give positive feedback for my effort:

CODE:(THIS IS THE ENTIRE CODE WITH SOME DEFAULT VALUES FOR THE VARIABLES)YOU MAY ONLY NEED THE SWITCH PART AS PER YOUR QUESTION WHICH HAS BEEN MADE BOLD

#include<bits/stdc++.h>
using namespace std;
int main()
{
int grade=6;
int fee;
bool leadrole=true;
bool roles2=false;
switch(grade)
{
case 0: cout<<"Grade 0 students cannot take part in the play";
break;
case 1:
case 2:fee=45;
cout<<"your fee is rs "<<fee;
break;
case 3:
case 4:
case 5: fee=65;
cout<<"your fee is rs"<<fee;
break;
case 6:
case 7:if(leadrole== true)
{
if(roles2== true)
{
cout<<"your pupil cannot play two roles if he is plAYING a lead role please enter the data correctly";
break;
}
fee=100;
cout<<"your fee is rs"<<fee;
break;
}
else if(roles2==true)
{
fee=130;
cout<<"your pupil is palying two roles and your fee is rs "<<fee;
break;

}
else{
fee=70;
cout<<"your fee is rs"<<fee;
break;
}
default: cout<<"please enter the correct values of the grade and leadrole and roles2";   

}

}

SNAPSHOT OF THE CODE:

{ 16 case 4: 20 main.cpp 1 #include<bits/stdct.h> 2 using namespace std; 3 int main() 4-{ 5 int grade=6; 6 int fee; 7 bool le

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

  • 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