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]

Reply via email to