programming-examples/c++/Others/Cin example.cpp

20 lines
329 B
C++
Raw Normal View History

2019-11-15 12:59:38 +01:00
Cin example
#include <iostream.h>
int main(void)
{
int number,highNumber;
cout<<"Please enter a whole number (ctrl q) to quit";
while(cin>>number)
{
if(number > highNumber)
highNumber = number;
cout<<"Please enter a whole number (ctrl q) to quit";
}
cout<<"High number is :"<<highNumber<<endl;
return 0;
}