Friday, May 14, 2010

Post 2

This post will show you how to using selection in C++.
The first example is to decide grade of student subject based on their marks.
We will declare grade as char and marks as int.
Then, we will prompts the users to enter their marks.

Clik here for coding.

Then, the program will decide the grade of the student based on the marks that student
enter.

The next program is to decide how much bonus the salesman will get based on their sales.
The program will first prompts the salesman to enter their sales.
We declare sales and bonus as int.

The program then will print the bonus that the salesman will get based on their sales.

This next program will asks the user to prompt their bill and the program will decide how much discounts the user will get.

Click here for coding.

The program will then calculate and print the payment that the user need to pay based on
the bill that the user prompt and the discount they get.

No comments:

Post a Comment