Following is the code, I have written to get two inputs from user. But when I run the program, It takes only one input and generate other by itself and calculate the wrong v
simply put -
int x = System.in.read();
automatically throws an exception.