0
Can anyone find what's wrong with this code,it doesn't give the correct answer.
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.
+ 3
you leave while loop if numb is 0.
numb cant be 145
abc=(145==sum)?"strong":"not strong";
System.out.println(abc);
+ 1
Yes. As @Oma Falk said, make copy of original number and compare with sum.
Your numb is 0, when comparing.
0
It should return the answer as strong number as 145 is
0
What does your program do
0
Charles Mutua it is a strong number program