Sunday, November 2, 2014

Filled Under: , , ,

Program to find area of circle using command line argument.

Share


Code Box
-------------------------------------

/*Program to find area of circle using command line argument */

class areac
{
public static void main(String x[])
{

float a,r;

r=Float.parseFloat(x[0]);

System.out.print("\nRadius of circle is = "+r);

a=3.14f*r*r;

System.out.print("\nAread of circle is = "+a);



}
}

0 comments:

Post a Comment