0
What is the Output of this code?
int n=15,s=0,x; for(int i=0; i<=n; i++){ x=n%10; s=s+x; n=n/10; } System.out.println(s);
2 Answers
+ 4
Major just saying,i don't think you should answer for such questions, they can run the program themselves and check the output .
If they want an explanation or want to know where to run the code then they should format it to ask about that specifically , no need to do others work!!.
+ 3
Ok thank you for the info Abhay, I will delete the answer.
Thanks, now Ive learned something new, I'll keep it in mind. :)



