=====================================================================
C++ statments of switchcase and ouput, to calculate and display amount (not full program)
(Here , i have assumed that values have been assigned to the values already)
--------------------------------------------------------------------------------
//switch case statement for calculating fee
switch(grade){
case 1 ... 2 :
//if grade is 1 or 2 , then fee will be 45 and then switch will
break
fee = 45;
break;
case 3 ... 5 :
//if grade is 3,4 or 5 , then fee will be 65 and then switch will
break
fee = 65;
break;
case 6 ... 7 :
//checking using if statements if leadrole or 2 roles is true or
not
if(leadrole == true)
{
fee = 100;
}else if(roles2 == true)
{
fee = 130;
}else
{
fee = 70;
}
break;
default:
//displaying that grade value isn't correct
cout<<"INPUT GRADE VALUE!"<<endl;
}
//display statement to show amount to be paid
cout<<"Amount to be paid: R"<<fee<<endl;
---------------------------------------------------------------------------
===============================================
FULL PROGRAM (IF YOU NEED)
--------------------------------------------------------------------------
#include <iostream>
using namespace std;
int main()
{
int grade = 7;
int fee = 0;
bool leadrole = false;
bool roles2 = true;
//switch case statement for calculating fee
switch(grade){
case 1 ... 2 :
//if grade is 1 or 2 , then fee will be 45 and then switch will
break
fee = 45;
break;
case 3 ... 5 :
//if grade is 3,4 or 5 , then fee will be 65 and then switch will
break
fee = 65;
break;
case 6 ... 7 :
//checking using if statements if leadrole or 2 roles is true or
not
if(leadrole == true)
{
fee = 100;
}else if(roles2 == true)
{
fee = 130;
}else
{
fee = 70;
}
break;
default:
//displaying that grade value isn't correct
cout<<"INPUT GRADE VALUE!"<<endl;
}
//display statement to show amount to be paid
cout<<"Amount to be paid: R"<<fee<<endl;
return 0;
}
---------------------------------------------------------------------------------------
=============================================================
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 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 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...
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 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 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 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 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 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...