design a c program that will calculate and print the total a
design a c++ program that will calculate and print the total amount of money a company owes for a seminar based on the input numbers of reistraints. If the user enters the number 0 or a negative number, the program should print and appropriate error message. use the case form for your program give your program the name: SEMINAR
Number of registrants
1-4
5-10
11 or more
fee per person
100
80
60
Solution
Output:
Enter The Number Of Persons: 10
Total Money Is 800
Program:
#include <stdio.h>
int main()
{
int n ;
printf(\"Enter The Number Of Persons: \");
scanf(\"%d\",&n);
if(n<=0)
printf(\"Number Must Be Greater Than Zero\");
else{
if(n<5)
printf(\"Total Money Is %d\", n*100);
else if(n<11)
printf(\"Total Money Is %d\", n*80);
else
printf(\"Total Money Is %d\", n*60);
}
return 0;
}
