1. switch case construct into if-else-if :
switch(n)
case 1:
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
9
Answer:
Here is your answer
Explanation:
After converting
If(n==1)
{
S=a+b;
System.out.println("sum="+s) ;
}
Else if(n==2)
}
D=a-b
System.out.println("Diffrences="+d);
}
Else if(n==3)
{
P=a*b;
System.out.println("product"="+p);
}
Else
System.out.println("wrong choice");
Plz mark as brainliest
Similar questions
Math,
5 months ago
English,
5 months ago
CBSE BOARD X,
5 months ago
Biology,
10 months ago
Physics,
10 months ago
History,
1 year ago
Math,
1 year ago
Psychology,
1 year ago