0
How find max between a lot of numbers? With for/while loop.
in c++ language
3 Réponses
- 1
seems pretty obvious...
+ 6
Mostafa , this is question answer section.. please don't expect people to code for you entirely... do share your code and let us know where you are confused or stuck... doing it yourself will help you to put your learning into implementation
+ 3
Just the bare-bones to understand the idea
cin >> number;
max = number;
while ( 1 )
if ( cin >> number )
max = number > max ? number : max;
else
break;