0

Can anyone find what's wrong with this code,it doesn't give the correct answer.

https://code.sololearn.com/c7p9vh7931uS/?ref=app

23rd Jul 2020, 11:23 AM
Ajoh Pv
Ajoh Pv - avatar
6 Answers
+ 4
Yes, please give us more details about expected input and output of your task. Always help the answerer as much as you can, so they can help you.
23rd Jul 2020, 11:27 AM
HonFu
HonFu - avatar
+ 3
you leave while loop if numb is 0. numb cant be 145 abc=(145==sum)?"strong":"not strong"; System.out.println(abc);
23rd Jul 2020, 11:56 AM
Oma Falk
Oma Falk - avatar
+ 1
Yes. As @Oma Falk said, make copy of original number and compare with sum. Your numb is 0, when comparing.
23rd Jul 2020, 12:23 PM
Jayakrishna 🇼🇳
0
It should return the answer as strong number as 145 is
23rd Jul 2020, 11:36 AM
Ajoh Pv
Ajoh Pv - avatar
0
What does your program do
23rd Jul 2020, 12:29 PM
Charles Mutua
Charles Mutua - avatar
0
Charles Mutua it is a strong number program
23rd Jul 2020, 12:44 PM
Ajoh Pv
Ajoh Pv - avatar