|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (4 bit)
Join Date: Apr 2002
Location: miami, fl
Posts: 14
|
hi i just started a c++ class at fiu
the instructor game me a writen program to copy i did that and it has no errors . the program i s supposed to pic the smalles out of 10 numbers he want me to make an input file with 10 numbers so that when i run the program it tells me which is the smallest. i have no clue how to do this help.... |
|
|
|
|
|
#2 |
|
Registered User
Join Date: Nov 2001
Posts: 1,965
|
Code:
int nums[10];
cin >> nums[0];
int min = nums[0];
int i;
for (i = 1; i < 10; i++) {
cin >> nums[i];
if (nums[i] < min) {
min = nums[i];
}
}
cout << min;
|
|
|
|
|
|
#3 |
|
Member (6 bit)
|
Hey thanks, I got no instructor or class I'm taking the Abe Lincoln route so this kinda stuff helps.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|