import java.util.Scanner; /* * Prompts and adds three numbers together. */ public class AddThreeNum { public static void main(String[] argv) { // Code reads and adds three numbers Scanner sc = new Scanner(System.in); System.out.print("Enter a number: "); int num1 = sc.nextInt(); System.out.print("Enter a number: "); int num2 = sc.nextInt(); System.out.print("Enter a number: "); int num3 = sc.nextInt(); int result = num1+num2+num3; System.out.println(num1+" + "+num2+" + "+num3+" = "+result); } }