0
How to find the largest number in a intenger using C++?(I try using for,while and array)
Ex: Input:671496 Output: 9
3 Respuestas
+ 3
Do yourself and if you have doubt on your code then ask
+ 1
Did you formulate your question properly? You are asking "how to find the largest number in an integer"? That question makes no sense unless you want to know the largest number that can be represented in an integer type (I assume you mean a 32bits integer type)
0
Use a "while" loop and make use of "%" modulo and "/" divide operators.