Skip to content

Instantly share code, notes, and snippets.

@zpd-2016-17
Created March 24, 2013 22:09
Show Gist options
  • Save zpd-2016-17/5233770 to your computer and use it in GitHub Desktop.
Save zpd-2016-17/5233770 to your computer and use it in GitHub Desktop.
Super awesome calculator!
import java.util.Scanner;
class apples{
public static void main(String args[]){
Scanner calculator = new Scanner(System.in);
double n1, n2, n3;
System.out.println("The Calculator can make a sum of 2 numbers.");
System.out.print("Number 1 - ");
n1 = calculator.nextDouble();
System.out.print("Number 2 - ");
n2 = calculator.nextDouble();
System.out.print("The Result = ");
n3 = n1 + n2;
System.out.print(n3);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment