Arsi University
Department of Information Systems
Basic Computer programming
Lab Project (25)% - Group with maximum of 4 members
Submission date is June 17, 2025.
Instruction
Write a c++ code for each question.
Do your assignment by group of not more than four.
Submission after deadline is not entertained.
The assignment should be submitted via Telegram through class
representative.
1. Write a program that implements the following algorithm.
Start
Read the total hours the employee has worked, TotalHours
Read the hourly rate of pay for the employee, HourlyRate
GrossSalary = TotalHours * HourlyRate
Tax = GrossSalary * 0.1
NetSalary = GrossSalary - Tax
Display NetSalary
Stop
2. Write a program that calculates and displays the area and the circumference of a
circle based on its radius entered from the keyboard.
3. Write a program that accepts a character from the keyboard and tells whether it is
a digit or a letter or a special symbol.
4. Write a program that converts a temperature given in Fahrenheit into Celsius and
vice verse. The program should distinguish temperature entered from the
keyboard as in degree centigrade or as in degree Fahrenheit by the letters ‘c/C’ or
‘f/F’ that must be written in front of the numeric values of temperatures. For
example:- If the user enters 10 c or 10 C, the program must understand that the
input is in degree centigrade so it should change to degree Fahrenheit and must
display the temperature as 50 f or 50 F.
1
5. Write a program that calculates and displays the income tax of a salary entered
from the keyboard. Your program must calculate taxes according to the following
rates:
Up to 200Br 0%
200Br – 600Br 10%
600Br – 1200Br 15%
1200Br – 2000Br 20%
2000Br – 3500Br 25%
3500Br & above 30%
For example:- The income tax of a gross salary of 900 Birr is 85 Birr, which is
calculated as (200*0% + 400*10% + 300*15%)=85 Birr.
6. Write a program that displays n numbers starting from a number entered from the
keyboard.
Where n is a positive number to be entered from the keyboard.
7. Write a program that lets a user to enter numbers as long as s/he has entered a
positive number. When the user enters a negative number, the program must
display the prompt that says ‘Now you have entered a negative number’ then after
it should be terminated.
8. Write a program that computes and displays the sum, the difference and the
product of a range of consecutive numbers where the starting and ending numbers
of the range are to be entered from the keyboard.
9. Write a program that displays the multiplication table in a proper output format.
10. Write programs that generate the following patterns.
5
454
34543
2345432
123454321
2345432
34543
454
5
2
11. Write programs that generate the following patterns.
a
bc
de f
gh i j
kl mno
pq r stu
12. Write programs that generate the following patterns.
12345
1234
123
12
1
13. Write programs that generate the following patterns.
**
****
******
*** ***
**** ****
***** *****
********
********