-
Notifications
You must be signed in to change notification settings - Fork 0
/
arithmetic.java
28 lines (23 loc) · 952 Bytes
/
arithmetic.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import java.util.Scanner;
public class arithmetic
{
//-----------------------------------------------------------------
// Prints the sum, difference, product number of three integers.
//-----------------------------------------------------------------
public static void main(String[] args)
{
int FirstNum;
int SecondNum;
int ThirdNum;
Scanner MyNumber = new Scanner(System.in);
System.out.println("Enter First Number");
FirstNum = MyNumber.nextInt();
System.out.println("Enter Second Number");
SecondNum = MyNumber.nextInt();
System.out.println("Enter Third Number");
ThirdNum = MyNumber.nextInt();
System.out.println("summation is: " + (FirstNum+SecondNum+ThirdNum));
System.out.println("difference: " + (FirstNum-SecondNum-ThirdNum));
System.out.println("product: " + (FirstNum*SecondNum*ThirdNum));
}
}