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
hey bro this should work for what you need i think if its not let me know
import java.io.IOException;
import java.util.Scanner;
public class noob{
class ThrowsExcpt {
int divide(int x, int y) throws ArithmeticException, IOException {
return x / y;
}
}
class ThrowsTemps {
public void main(String s[]) throws IOException {
Scanner sc = new Scanner(System.in);
System.out.println("Enter number 1");
int x = sc.nextInt();
System.out.println("Enter number 2");
int y = sc.nextInt();