......got stuck, what am i suppose to do
Author |
Message |
noradII
|
Posted: Thu Jun 01, 2006 4:29 pm Post subject: ......got stuck, what am i suppose to do |
|
|
who do i write a program that reads in a series of positive integers and output the range of the integers, that is, the interval from the smallest to the largest? ![Sad Sad](http://compsci.ca/v3/images/smiles/icon_sad.gif) |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
HellblazerX
![](http://www.plamania.co.kr/shopimages/plmtest/2910040000213.jpg)
|
Posted: Thu Jun 01, 2006 4:34 pm Post subject: (No subject) |
|
|
My suggestion would be to have 2 variables, one that stores the value of the smallest number, and one that stores the value of the larger number. As you go through the numbers, if you come across one that smaller than the one in the variable containing the smallest number, then you replace that value with the number you're currenting reading. Do the same with the largest number. |
|
|
|
|
![](images/spacer.gif) |
Cervantes
![](http://compsci.ca/v3/uploads/user_avatars/1023105758475ab2e040bde.jpg)
|
Posted: Thu Jun 01, 2006 5:45 pm Post subject: (No subject) |
|
|
noradII, please use more descriptive topic titles. "......got stuck, what am i suppose to do" tells us nothing of your problem. The more descriptive the title, the more help you'll get. |
|
|
|
|
![](images/spacer.gif) |
|
|