hi,
i have been messing around with this for the past hour and don't know whats wrong and so I would appreciate if someone can point out my problem. What im trying to do is search through a user input (not above 10) find the highest number and lowest no in c++.Thanks in advance for your help!!!
# include <iostream.h>
#include <conio.h>
void main ()
{
int lowest = 0;
int number = 0;
cout<<"Enter in the number"<<endl;
cin>>number;
lowest = number;
for(int count =0; count < 3; count++)
{
cout<<"Enter in the number"<<endl;
cin>>number;
if(number < lowest)
lowest = number;
}
cout<<lowest;
}
Bookmarks