public void getPoint(double r, double angle)
{
//cosine*hypotenuse=adjasent
double x = r * Math.cos (Math.toRadians(angle))//in radians;
//sine * hypotenuse =opposite
double y=r*Math.sin(Math.toRadians(angle))//also in radians;
System.out.println("( "+x+", "+y+" )");
}
int radius = 2; int output; radius = radius * 2; output = radius * Math.PI; Console.WriteLine(output);
// macro definitions: #define PI 3.14159265358979323846 #define CIRCUMFERENCE(radius) (2. * (radius) * PI) // use this as in CIRCUMFERENCE(21.34)
#include<stdio.h> main() { int r; float area; clrscr(); printf("enter the value of r\n"); scanf("%d",&r); area=3.142*r*r; printf("area of circle=%f\n",area); getch(); }
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); } }
#include<stdio.h> void main() { int r; int pi=3.14; float cir,area; printf("/n enter the radius of the circle"); scanf("%d",&r); cir=2*pi*r; area=pi*r*r; printf("the circumference of the circle is%d",cir); printf('the area of the circle is %d",area); }
The radius of a circle is half of its diameter.
Radius of a circle = diameter/2
int radius = 2; int output; radius = radius * 2; output = radius * Math.PI; Console.WriteLine(output);
Double the Radius to Calculate the Diameter.
Radius of a circle = diameter/2
From what? You need other variables you can use in the standard circle formulae from which to calculate the radius.
The radius is 12
The radius is a lenght, and it's impossible to find out the radius if you don't give any information about the size of your circle.
Divide the diameter by 2.
pi radius squared
The radius is one -half of the diameter. It is the distance from the circle center to any point on the circumference.
you calculate the Area of the circle at the end of the Cylinder and then multiply it by the lenght to the second circle at the end of the cylinder Circle area= Radius*Radius* pi pi being 3.14159265