class area{ int l,w,a; a=i*w; printf"area of rectangle is= %d",a; endl; }
a circle has an area of 36pie square centimeters what is the circumference ?
Rewrite the above program so that the program accepts any value for the radius then recalculate the area of the circle.
program that display the area of a circle of a reduce
Using 3.14 as Pi the area of circle is: 0
Using 3.14 as Pi the area of circle is: 0
a circle has an area of 36pie square centimeters what is the circumference ?
By using that one thing.
Rewrite the above program so that the program accepts any value for the radius then recalculate the area of the circle.
public class CircleDiameter { publicCircleDiameter() { super(); } publicfloatgetDiameterFrmRadius(float radius){ return radius * 2; } /** * @param args */ public static void main(String[] args) { float radius = 5; CircleDiameter circle = newCircleDiameter(); float dia = circle.getDiameterFrmRadius(radius); System.out.println("Diameter of this circle is: " + dia); } }
program that display the area of a circle of a reduce
Using 3.14 as Pi the area of circle is: 0
Using 3.14 as Pi the area of circle is: 0
Using 3.14 as Pi the area of circle is: 0
Using 3.14 as Pi the area of circle is: 314.0
Using 3.14 as Pi the area of circle is: 0
Using 3.14 as Pi the area of circle is: 132.665
Using 3.14 as Pi the area of circle is: 0