Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Main.java
import java.util.*; public class Main { public static void main(String[] args) { System.out.println("0801IT181082"); 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.
BinaryTreeFindNext_noParentPointer
jsis
Sieve of Eratosthenes Revisited
bubble sort
Linear Seach
LRU cache - Using doubly linked list (Fast!)
Java tester
Simple imitation for show banners on priorities
Problem: on_off
Union of Arrays
Please log in to post a comment.