2 Answers
0
if i could only send a picture but it has to find the lowest and highest number for example
1
2
3
4
5
lowest: 1
highest:5
0
OK ok. Try with this:
#include <iostream>
using namespace std;
int main() {
int i,n,largest,smallest;
i=1;
largest=0;
smallest=9999;
cout<<"Kindly please enter your integer, thank you: \n\n";
do{
cin>>n;
if(n>largest)
largest=n;
if(n<smallest)
smallest=n;
i++;
}
while(i<6);
cout<<"The largest number is: "<<+ largest <<endl;
cout<<"The smallesr number is: "<<+ smallest << endl;
return 0;
}