- Programming is a process of problem solving
- Problem solving techniques:-
- Analyze the problem & Outline the problem requirenment
- Design steps (algorithm) to solve the problem
- Write a program
Exercise 2
Write a program to find the area of a rectangle. The area of the rectangle is given by the following formula:
area = length x width
Exercise 3
Write program that calculates mileage reimbursement for a salesperson at a rate of RM 0.65 per kilometer.
Your program should interact with the user in this manner :
Enter beginning odometer reading : 13505.5
Enter ending odometer reading :13810.6
You traveled 305.4 km
Your reimbursement is RM 198.51
No comments:
Post a Comment