Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
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
Please
log in
to post a comment.
4.a
Alllocate and release memory
Menu Combination Sum
JavaScript on Java's System.out.println()
FizzBuzz
susun
Extracting Value from a String that contains key value pairs
swastik
JAVA İLE CELCIUS HESAPLAMA - Fahrenheit to Celsius with Java
Minimum Vertices to Traverse Directed Graph
Please log in to post a comment.