package Mobile.OperatorsAndExpressions;
import java.util.Scanner;
public class ArithmeticOperators
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int a,b,sum,diff,pro;
System.out.println("Enter First Number");
a=sc.nextInt();
System.out.println("Enter Second Number");
b=sc.nextInt();
sum=a+b;
diff=a-b;
pro=a*b;
System.out.println("SUM="+sum);
System.out.println("Difference="+diff);
System.out.println("Product="+pro);
}
}
import java.util.Scanner;
public class ArithmeticOperators
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
int a,b,sum,diff,pro;
System.out.println("Enter First Number");
a=sc.nextInt();
System.out.println("Enter Second Number");
b=sc.nextInt();
sum=a+b;
diff=a-b;
pro=a*b;
System.out.println("SUM="+sum);
System.out.println("Difference="+diff);
System.out.println("Product="+pro);
}
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.