0

please check

please check this code in your compiler, is that code is correct or not. https://code.sololearn.com/cse09vu5zJSC/?ref=app

17th Jun 2023, 4:17 AM
MMK
MMK - avatar
3 Respostas
+ 4
MMK , the issue is, that all inputs except 20 leads to an infinite loop. this runs and is giving output until it is timed out.
17th Jun 2023, 10:31 AM
Lothar
Lothar - avatar
+ 3
The code compiles and runs. What is your criteria for being correct? Does it do what it is supposed to do? Have you tested it, with various inputs?
17th Jun 2023, 4:27 AM
Tibor Santa
Tibor Santa - avatar
0
Than how can i make perfect loop
17th Jun 2023, 1:25 PM
MMK
MMK - avatar