Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
jsis
//'main' method must be in a class 'Rextester'. //Compiler version 1.8.0_111 import java.util.*; import java.lang.*; class Rextester { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int num; System.out.println("enter the value"); num=sc.nextInt(); int temp= num; int sum= 0; System.out.println("enter the value"); while(num>0) { int r= num%10; sum+= r*r*r; num= num/10; } System.out.println(sum); if (temp==sum) { System.out.println("The number is Armstrong number"); } else { System.out.println("The number is not armstrong"); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
1.5
bikeride
test1
LRU cache - Simple solution (costly)
3.D
Problem: fb_series
1D
Abstract Inner Class
test no.1
fb_series
Please log in to post a comment.