Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Sumod
import java.util.*; class Rextester{ public static void main (String args[ ] ) { System.out.println("Enter a number with more than one digit : "); Scanner obj =new Scanner(System.in); int a= obj.nextInt(); int temp,b,sum=0; temp=a; while(temp>0) { b=temp%10; sum=sum+b; temp=temp/10; } System.out.println("The sum of those digits are: "+sum); } }
run
|
edit
|
history
|
help
0
JAVA # Dizi Ortalama
Reverse a Linked List in groups of given size k
1a
JAVA # Cümleye Boşluk Bırakma 2
Hosteller.java
pow x^n
1.5
Basic LinkedList in Java
Greedy algo Activity program
kth smallest element