Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Aaina
import java.util.*; public class Main { public static void main(String[] args) { System.out.println("0801IT181001"); Scanner sc=new Scanner(System.in); System.out.println("enter a number"); int n=sc.nextInt(); int s=0; for(int i=n;i>0;i/=10){ s=s+i%10;} System.out.println("Sum of digits is:"+s); }}
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
bookstore
Reverse a Linked List in groups of given size k
Quadratic equation
Neeraj
Max Repeated Number in array
Leetcode 202 Happy Number
arithematic
Java Object structure dumper (iterative)
ElaineBrown**
names
Please log in to post a comment.