Input
Output
>> javac Main.java
>> java Main
Enter any number : 
Sum of all digits in 123456 : 21