COMPRO2 - Excellence and Integrity
Problem #1
Write a program to compute the salary of an employee using the formula : salary=hours worked X hourly rate. Require an input for hours worked and hourly rate using the keyboard.
Sample output:
Enter hours worked: 20
Enter hourly rate: 70.50
Salary: 1410.0
Problem #2
Write a program to accept the gender of a person; 'M' for male and 'F' for female. Display an appropriate message based on gender.
Sample output:
Validation #1:
What is your gender? M
Good morning Sir!
Validation #2:
What is your gender? F
Good morning Ma'am!
Validation #3:
What is your gender? Male
Invalid gender!
SEND YOUR SOURCE CODE TO: adichosa@gmail.com
SUBJECT: <section>-COMPRO2-LACARLOTA-<fullname>
No comments:
Post a Comment