Write a C++ program to register students. Ask whether a student must be registered. If Y, ask whether the course to register for is BScIT? If Y display the amount of R15000.00 with a message that this is the course fee for this year. If not BScIT display R12000.00 with a message that this is the course fee for this year. Keep on registering students until there are no more students to register. Answer N to the question whether another student must be registered. Display the following: The total number of students registered and the total number of students registered for BScIT. The total amount received for all the registrations and the total amount received for the BScIT student registrations. Hints: You need TWO constant variables: bsc_fee and other_fee You need 4 counter variables: total_number, bsc_number, total_amt, bsc_amt Counter variables MUST get the value of 0 when you declare them. You need TWO char type variables: answer, bsc_course
Operations
In mathematics and computer science, an operation is an event that is carried out to satisfy a given task. Basic operations of a computer system are input, processing, output, storage, and control.
Basic Operators
An operator is a symbol that indicates an operation to be performed. We are familiar with operators in mathematics; operators used in computer programming are—in many ways—similar to mathematical operators.
Division Operator
We all learnt about division—and the division operator—in school. You probably know of both these symbols as representing division:
Modulus Operator
Modulus can be represented either as (mod or modulo) in computing operation. Modulus comes under arithmetic operations. Any number or variable which produces absolute value is modulus functionality. Magnitude of any function is totally changed by modulo operator as it changes even negative value to positive.
Operators
In the realm of programming, operators refer to the symbols that perform some function. They are tasked with instructing the compiler on the type of action that needs to be performed on the values passed as operands. Operators can be used in mathematical formulas and equations. In programming languages like Python, C, and Java, a variety of operators are defined.
Write a C++
Ask whether a student must be registered. If Y, ask whether the course to register for is
BScIT? If Y display the amount of R15000.00 with a message that this is the course fee for
this year. If not BScIT display R12000.00 with a message that this is the course fee for this
year.
Keep on registering students until there are no more students to register. Answer N to the
question whether another student must be registered.
Display the following:
The total number of students registered and the total number of students registered for
BScIT.
The total amount received for all the registrations and the total amount received for the
BScIT student registrations.
Hints:
You need TWO constant variables: bsc_fee and other_fee
You need 4 counter variables: total_number, bsc_number, total_amt, bsc_amt
Counter variables MUST get the value of 0 when you declare them.
You need TWO char type variables: answer, bsc_course
If you can you the preparation assignment, you should be able to do the assignment to
submit, which is described below:
Assignment to submit
Design a C++ program to do the administration for a fun run competition. Participants can
run a distance of 5 kilometers, 10 kilometers or 15 kilometers.
Registration fees for club members are as follows:
Distance Fee
5 Kilometers R 65.00
10 Kilometers R 100.00
15 Kilometers R 150.00
Non-members:
For the 5 and 10 kilometers distances, the participation fees must be increased by 25%
For the 15 kilometer distance the registration fee is double that of club members.
Ask the user whether a participant must be registered (Y or N). Ask whether the person is
a member of the club (Y or N) and ask the distance that the person wants to run (5 or 10
or 15).
Use the given criteria and input information to calculate the registration fee.
The program must keep track of the total number of participants per distance category, the
total amount received per distance category and total amount received.
The program must also calculate the total number of participants and the total number of
club members who registered.
Also write code to identify the category with the highest income in terms of registration
fees.
Display the following:
Total number of participants: xx
Total number of club members registered: xx
Number of participants per distance:
5 kilometers: xx R xxxx.xx
10 kilometers: xx R xxxx.xx
15 kilometers: xx R xxxx.xx
Total income: R xxxx.xx
Category with highest income: xxxxxxx
Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 1 images