TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Calculate Perfect Square using Java
Senthilvelan Sambamoorthy
Aug 13
2016
Code
741
0
1
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
ssvps.rar
// perfect square
import
java.io.*;
class
ssvps
{
public
static
void
main(String arg[])
throws
IOException
{
String s1;
int
m,n;
int
p;
DataInputStream dr =
new
DataInputStream(System.in);
System.out.print(
"\nEnter the Number : "
);
s1 = dr.readLine();
n = Integer.parseInt(s1);
p=(
int
)sqrt(n);
m = p;
if
(p == m)
System.out.println(
"\nit is Perfect Square"
+n);
else
System.out.println(
"\nit is Not Perfect Square"
+n);
}
}
Java