Advertisement
duckman123

JCHW

Nov 29th, 2015
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. //JC
  2. //Today
  3. //HW
  4. import java.util.Scanner;
  5. public class FindAvg
  6. {
  7.  public static void main(String[] args)
  8.  {  
  9.    Scanner input = new Scanner(System.in);
  10.    System.out.println("Enter a number: ");
  11.    int num = input.nextInt();
  12.    System.out.println("Enter another number: ");
  13.    int num2 = input.nextInt();
  14.    int avg = (num + num2) / 2;
  15.      System.out.println("Your average is " + avg);
  16.  }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement