Answer Posted / sadikhasan palsaniya
int no=687;
int sum=0;
int temp;
while(no>0)
{
temp = no % 10;
sum += temp;
no = no/10;
}
System.out.println(sum);
| Is This Answer Correct ? | 9 Yes | 0 No |
Post New Answer View All Answers
what is mena by object block any what is the use of that
What is difference between Heap and Stack Memory?
Can a abstract class be defined without any abstract methods?
What is java util concurrentmodificationexception?
How do you check if a number is a perfect square?
Can you explain the usages of class.forname()?
Can I learn java without any programming experience?
What methodology can be employed to locate substrings inside a string?
Why spring singleton is not thread safe?
What is the difference between throw and throws in java?
Is vector thread safe in java?
Can an interface extend another interface?
What is compiler and what its output.
What are examples of modifiers?
What is jdbc api?