forked from jomarnavarro/basicJava
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInts.java
More file actions
24 lines (17 loc) · 650 Bytes
/
Ints.java
File metadata and controls
24 lines (17 loc) · 650 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package dNumericTypes;
import libs.Input;
public class Ints {
public static void main(String args[])
{
// prompt user for x
int x = Input.get_int("x is: ");
// prompt user for y
int y = Input.get_int("y is: ");
// perform calculations for user
System.out.print(x + " plus " + y + " is " + (x + y) + "\n");
System.out.print(x + " minus " + y + " is " + (x - y) + "\n");
System.out.print(x + " times " + y + " is " + (x * y) + "\n");
System.out.print(x + " divided by " + y + " is " + (x / y) + "\n");
System.out.print("The reminder of " + x + " over "+ y + " is " + (x % y) + "\n");
}
}