Computer Science, asked by tushargupta10th, 1 month ago

switch (n)
{
case1:
S=a+B;
system. out. println("sum = " + S) ;
break;
case 2:
D = a-b;
system. out. println("difference =" + d);
break;
case 3:
P = a*b;
system. out. println("product = " + P) ;
break;
default:
system. out. println("wrong choice! ;
}​

Answers

Answered by insiya92
1

Answer:

if (n == 1) {

s = a + b;

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

}

else if (n == 2) {

d = a - b;

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

}

else if (n == 3) {

p = a * b;

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

}

else {

System.out.println("Wrong Choice!");

}

Explanation:

HOPE IT HELPS YOU

PLZ MARK ME AS BRIANLIEST PLZ

Similar questions