thanks for the code, are you just showing us your homework? or was there 
something you wanted to ask.
My only thing is you should only be getting 4, not 5. make for (i=0;i<5;i++)

                Thanks,
Tyler Littlefield
        http://tds-solutions.net
        Twitter: sorressean

On Feb 24, 2010, at 12:09 PM, tooyy ttyrt wrote:

> Write a program that reads in five integers and determines and prints the 
> largest and the smallest integers in the group. Use
> only the programming techniques you learned in this chapter.
> #include <iostream>
> using namespace std;
> int main()
> {
> 
> int x[5];
> int i;
> int lar,smal;
> 
> for(i=1;i<=5;i++)
> {
> cout<<"enter Five number"<<endl;
> cin>>x[i];
> 
> }
> lar = x[i] > x[5];
> cout<<"The large number =" <<lar << endl;
> smal = x[i] < x[5];
> cout<<"The smal number =" <<smal << endl;
> 
> 
> system("pause");
> return(0);
> }
> 
> [Non-text portions of this message have been removed]
> 
> 



------------------------------------

To unsubscribe, send a blank message to 
<mailto:[email protected]>.Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/c-prog/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/c-prog/join
    (Yahoo! ID required)

<*> To change settings via email:
    [email protected] 
    [email protected]

<*> To unsubscribe from this group, send an email to:
    [email protected]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to