Computer Science, asked by moazzamfirdous33, 1 year ago

wap a menu driver program or switchcase to find area or perimeter of a circle and area and perimeter of a square

Answers

Answered by RikCena
1
class ab
{
public static void main (int a,int r,int ch)
{
switch(ch)
{
case 1:
areacircle = 22/7×Math.pow(r,2);
pmcircle = 2×22/7×r;
System.out.println(areacircle);
System.out.println(pmcircle);
break;
case 2:
areasq = Math.pow(a,2);
pmsq = 4*a;
System.out.println(areasq);
System.out.println(pmsq);
break;
default :
System.out.println("WRONG CHOICE");
}
}
}

If this helps u then only mark as brainliest.
Similar questions