hascet
Fully Optimized
- Messages
- 3,218
I wrote this program in Java, but I can't figure out how to run it without opening it up in the IDE and running it through there. there must be some way to run it as like an .exe. Does anyone know how you would do that?
It just multiplies lol, but I wrote all on my own without any books or help, which is pretty sweet! I'm so proud of my multiplying program haha!
It just multiplies lol, but I wrote all on my own without any books or help, which is pretty sweet! I'm so proud of my multiplying program haha!
Code:
// The "Calculator" class.
import java.awt.*;
import hsa.Console;
public class Calculator
{
static Console c;
public static void main (String [] args)
{
c = new Console ();
double num1, num2;
c.println("Sean's Multiplication Calculator \n" + "Enter a number then <Enter>");
num1 = c.readDouble ();
c.println("Enter a second number then <Enter>");
num2 = c.readDouble ();
c.print(num1+"*"+num2+"=");
c.print(num1*num2);
}
}