Skip to content

Commit

Permalink
Got calculator working
Browse files Browse the repository at this point in the history
  • Loading branch information
tealminivan committed Sep 27, 2020
1 parent e3adcaa commit 09e822e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Binary file added .DS_Store
Binary file not shown.
12 changes: 6 additions & 6 deletions src/main/java/Calculator.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,27 @@

public class Calculator{
public double add(double x, double y){
return 0.0;
return x+y;
}

public double subtract(double x, double y){
return 0.0;
return x-y;
}

public double multiply(double x, double y){
return 0.0;
return x*y;
}

public double divide(double x, double y){
return 0.0;
return x/y;
}

public double squareRoot(double x){
return 0.0;
return Math.sqrt(x);
}

public double power(double x, int power){
return 0.0;
return Math.pow(x,power);
}

public static void main(String args[]){
Expand Down

0 comments on commit 09e822e

Please sign in to comment.