Skip to content

Instantly share code, notes, and snippets.

@rpau
Last active April 1, 2018 11:40
Show Gist options
  • Save rpau/0f9d6dc9d91591a6dac552998bd6bcbb to your computer and use it in GitHub Desktop.
Save rpau/0f9d6dc9d91591a6dac552998bd6bcbb to your computer and use it in GitHub Desktop.
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