Introduction To Algorithms: CSBP119 - Algorithms & Problem Solving
Introduction To Algorithms: CSBP119 - Algorithms & Problem Solving
http://math.hws.edu/javanotes/c1/s1.html
Exercises
• Write an algorithm for calculating
the area of a rectangle
• Solution:
1. Read a number and store it in max
2. Repeat the following 99 times:
a) Read a number and store it in X
b) If X > max then max =x
3. Display max