mirror of
https://github.com/System-End/APCSA.git
synced 2026-04-19 16:38:24 +00:00
19 lines
503 B
Java
Executable file
19 lines
503 B
Java
Executable file
import java.lang.Integer;
|
|
import java.util.Scanner;
|
|
|
|
public class U2_L7_Activity_Two {
|
|
|
|
public static void main(String[] args) {
|
|
Scanner scan = new Scanner(System.in);
|
|
Integer x = null;
|
|
Integer y = null;
|
|
|
|
System.out.println(x + " " + y);
|
|
System.out.println("Enter values:");
|
|
x = scan.nextInt();
|
|
y = scan.nextInt();
|
|
|
|
Double avg = (double) (x + y) / 2;
|
|
System.out.println("Average of " + x + " and " + y + " is " + avg);
|
|
}
|
|
}
|