Computer Science Canada Simple number comparison for a beginner |
| Author: | Naveg [ Fri Jan 28, 2005 6:44 pm ] |
| Post subject: | Simple number comparison for a beginner |
How do i compare 5 user specified numbers and print the largest and smallest? without using a billion if statements |
|
| Author: | wtd [ Fri Jan 28, 2005 7:20 pm ] | ||
| Post subject: | |||
For finding the minimum:
Assuming an array with 5 numbers: [3, 4, 1, 2, 9]
|
|||