Last active
April 1, 2018 11:40
-
-
Save rpau/0f9d6dc9d91591a6dac552998bd6bcbb to your computer and use it in GitHub Desktop.
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
import java.io.InputStream; | |
import java.util.LinkedList; | |
public class Calculator { | |
private double total = 0, zero=0; | |
private void reset(){total = 0;} | |
public int getTotal(){return total;} | |
public void sum(double value){total+=value;} | |
public void pow(double value) { | |
/* | |
for (int i = 0; i < value; i++) { | |
multiply(value); | |
}*/ | |
total = Math.pow(total, value); | |
System.out.println("The pow is "+total); | |
}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment