Answer to Question #294371 in C++ for fisiwe

Question #294371

Number of registrants Fee per person


1 through 4 R100.00


5 through 10 R 80.00


11 or more R 60.00


Complete the program below.


#include <iostream> using namespace std; int main()


{


// Question 4.1 (2)


// Declare a variable to hold the number of registrants and a


// variable to hold the amount a company owes for a seminar

1
Expert's answer
2022-02-06T03:52:03-0500
#include<iostream>

using namespace std;

int main()
{
	int reg;
	double sumForSem=0;
	cout << "Please, enter a number of registrants: ";
	cin >> reg;

	if (reg >= 1 && reg <= 4)
	{
		sumForSem = 100 * reg;
	}
	else if (reg >= 5 && reg <= 10)
	{
		sumForSem = 80 * reg;
	}
	else if (reg >= 11)
	{
		sumForSem = 60 * reg;
	}
	cout << "A company owes for a seminar R " << sumForSem;
}	

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog