Răspuns:
O sa fac in Java
int a;
int b;
Scanner userInput;
System.out.println("What is the first number?") ;
userInput = new Scanner(System.in);
a = userInput.nextInt() ;
System.out.println("What is the second number?") ;
userInput =new Scanner(System.in);
b=userInput.nextInt();
int c=(a+b) /2;
System.out.print(c);