import java.util.Scanner;
public class Calculator{
public static void main(String[] args){
System.out.println("Enter integers x,y");
Scanner in = new Scanner(System.in);
int a,b;
a = in.nextInt();
b = in.nextInt();
int r=0;
System.out.println(" CALCULATOR ");
r=a+b;
System.out.println("a + b = "+r);
r=a-b;
System.out.println("a - b = "+r);
r=a*b;
System.out.println("a * b = "+r);
r=a/b;
System.out.println("a / b = "+r);
}
}
No comments:
Post a Comment