Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Tech No.
//'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); System.out.println("enter a no"); int n = Sc.nextInt(); int i,d,c=0,p,s,r; for (i=n;i>0;i=i/10) // error tha { c++; } if(c%2!=0) System.out.println("invalid no"); else { d=(int)Math.pow(10,c/2); p=n%d; r=n/d; s=p+r; if(s*s==n) // error tha System.out.println("yes"+n); else System.out.println("no"+n); } } }
run
|
edit
|
history
|
help
0
4th question
jb11.0 threads tick tock
Happy Numbers
Add Index of max number in an array
Hi Hypotaneous
jb12.0 threads.enums
Display Page (Pagination)
Minimum Vertices to Traverse Directed Graph
Frequecy count hashmap
inheritance