import java.io.*;
class Area throws IOException
{
BufferedReader br = new BufferedReader( new InputStreamReader (System.in));
double area;
try
{
void getdata()
{
System.out.println (" Enter the Choice ");
System.out.println(" You want to Find area of ");
System.out.println(" 1. Circle \n 2. Rectangle \n3. Square ");
int Choice ;
char ans= 'y';
while (ans=='y')
{
System.out.println(" Enter Choice");
Choice = br.read();
switch (Choice)
{
case 1:
/*int r;
System.out.println(" Enter the Radius of the Circle");
r=br.read();*/
circle();
//System.out.println("Area is "+area);
case 2:
System.out.println(" Enter the side of the Rectangle ");
int l=br.read();
int b=br.read();
rect(l,b);
System.out.println("Area is "+area);
case 3:
int s;
System.out.println("Enter the side of square ");
s=br.read();
sqr(s);
System.out.println("Area is "+area);
case 4:
System.out.println(" You have Entered Wrong Choice");
}
System.out.println(" Did you want to try Again ,Enter Y/N");
ans=(char)br.read();
}
}
void circle()
{
int r;
System.out.println(" Enter the Radius of the Circle");
r=br.read();
//circle (r);
area=3.14*r*r;
System.out.println("Area is "+area);
//return area ;
}
double rect(int l,int b)
{
area=l*b;
return area;
}
double sqr(int side)
{
area =side*side;
return area;
}
}
catch (Exception e)
{
}
}
class Areamain
{
public static void main (String arg[])
{
Area sc = new Area();
sc.getdata();
}
}