I am still a beginner learner in java. While practising, i found this problem:
Write a java program that takes a number between 1 to 1000 as input and outputs the sum of all digits of the number. You cannot use these:
1. String methods
2. Loop
3. Array
What I can understand that I have to use mathematical expressions to solve this. But how am I supposed to do it?
