Skip to content

Commit

Permalink
Merge pull request ambujraj#1353 from Brussell03/feature/brussell03
Browse files Browse the repository at this point in the history
added perfect square in java
  • Loading branch information
ambujraj authored Nov 10, 2018
2 parents 0567e32 + 6e6a88f commit ef0c22b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
10 changes: 8 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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]
13 changes: 13 additions & 0 deletions prefect_square/PerfectSquare.java
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");
}
}
}

0 comments on commit ef0c22b

Please sign in to comment.