forked from ambujraj/hacktoberfest2018
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ambujraj#1353 from Brussell03/feature/brussell03
added perfect square in java
- Loading branch information
Showing
2 changed files
with
21 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2019,6 +2019,13 @@ About: Student | |
Programming Language: C, C++, Java, Python | ||
Email: [email protected] | ||
|
||
Name: [Brian Russell](https://github.com/Brussell03) | ||
Place: Conway, Arkansas | ||
About: Computer science student interested in software development | ||
Programming Language: Java, Javascript | ||
Email: [email protected] | ||
|
||
|
||
Name: [Akshay Gulhane](https://github.com/akshaygulhane) | ||
Place: Bangalore India | ||
About: Full Stack Developer | ||
|
@@ -2059,5 +2066,4 @@ Name: [Prasun](https://github.com/rupna100)<br/> | |
Place: India<br/> | ||
About: Computer science student<br/> | ||
Programming languages: c , cpp, python , ruby , js <br/> | ||
Email: [email protected] | ||
|
||
Email: [email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import java.util.Scanner | ||
|
||
public class Main { | ||
public static void main(String[] args) { | ||
Scanner sc = new Scanner(System.in); | ||
double num = sc.nextInt(); | ||
if(Math.sqrt(num) % 1 == 0){ | ||
System.out.println("This is a perfect square"); | ||
} else { | ||
System.out.println("This is not a perfect square"); | ||
} | ||
} | ||
} |