Answer Posted / asit purohit
int num=5672;
int sum=0;
while(num%10!=0)
{
sum=sum+num%10;
num=num/10;
}
System.out.println("sum="+sum);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to create a fecelet view?
What are the approaches that you will follow for making a program very efficient?
Explain the inheritance?
What classes of exceptions may be thrown by a throw statement?
Can array grow dynamically in java?
what invokes a threads run() method? : Java thread
What is diamond operator in java?
What is local variable and instance variable?
Explain about procedural programming language or structured programming language and its features?
How do you access command-line arguments within the code?
How to sort list of list in java?
How do you get the length of a string in java?
Can we define a package statement after the import statement in java?
What is cr keyboard?
What methodology can be employed to locate substrings inside a string?