A simple program that compiled success, but can not input second number, no prompt. number doesn't match the first number input at keyboard with display on output. Thanks
========================
/* Enter two number at prompt
* Add both number
* Print out Total
*
* 1/31/2011
* Code Name Add2Number.java
*/
import java.io.*;
class Add2Number {
public static void main(String[] args)
throws java.io.IOException {
int n1, n2, Total;
System.out.println("Enter Your First Number:");
n1 = (int) System.in.read();
System.out.println("Enter Your Second Number:");
n2 = (int) System.in.read();
Total = n1 + n2;
System.out.println("n1 = " + n1);
System.out.println("n2 = " + n2);
System.out.println("Total = " + Total);
}
}