Prac 4 A

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

import java.util.

*;
class area
{
public static void main(String args[])
{
double s,r,cir,sq;
Scanner a=new Scanner(System.in);
System.out.println("Enter radius:");
r=a.nextFloat();
cir=3.14*r*r;
System.out.println("Area of circle is "+cir);
System.out.println("Enter side of the square:");
s=a.nextFloat();
sq=s*s;

System.out.println("Area of square is "+sq);

}
}

You might also like