Computer Science, asked by sangeetaalok1982, 2 days ago

wap to input two numbers and calculate their sum and diffrence.​

Answers

Answered by xXAryanKingXx
0

Answer:

refers to the attachment

Attachments:
Answered by Anonymous
3

 \huge \rm \red{answer}

import java.util.*;

class number

{

public static void main(String args[])

{

Scanner in=new Scanner (System.in);

int a,b,s,d,p,r,q;

System.out.println("Enter a and b: ");

a=in.nextInt();

b=in.nextInt ();

s=a+b;

d=a-b;

p=a*b;

q=a/b;

r=a%b;

System.out.println("Sum: "+s);

System.out.println("Difference: "+d);

System.out.println("Product: "+p);

System.out.println("Quotient: "+q);

System.out.println("Remainder: "+r);

}

}

Similar questions