Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 05-13-2002, 05:11 PM   #1
Member (4 bit)
 
Join Date: Apr 2002
Location: miami, fl
Posts: 14
Angry Fire c++ help newb

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....
danielsol10 is offline   Reply With Quote
Old 05-15-2002, 02:44 PM   #2
aym
Registered User
 
aym's Avatar
 
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;
aym is offline   Reply With Quote
Old 05-24-2002, 10:33 PM   #3
Member (6 bit)
 
Join Date: Mar 2002
Location: Chicago, Illinois USA
Posts: 46
Send a message via ICQ to Sunday Silence Send a message via AIM to Sunday Silence Send a message via Yahoo to Sunday Silence
Hey thanks, I got no instructor or class I'm taking the Abe Lincoln route so this kinda stuff helps.
Sunday Silence is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 12:18 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2