int radius = 2; int output; radius = radius * 2; output = radius * Math.PI; Console.WriteLine(output);
By using that one thing.
// 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(); }
2. Write a program using switch statement that reads a character representing a geometrical figure, then asks the user to enter the required data (ex. Radius for a circle, length and height for a rectangle, etc. ...) . The program should then print the area and circumference.Figures are: circle(c), square(s), rectangle(r), triangle (t).
#include<stdio.h> void main() { int r=10; float pi=3.14,c; c=pi*r*r; printf("Area of the circle=%f",c); getch(); }
int radius = 2; int output; radius = radius * 2; output = radius * Math.PI; Console.WriteLine(output);
By using that one thing.
Learn c programming and geometry. It will be easy when you know both.
The area of a circle (A) is pi x r x r.The circumference of a circle (C) is pi x d, or pi x 2r.So if you know C, you can calculate r using the formula C = pi x 2r or r = C/2piOnce you know r, you can calculate A using the formula A = pi x r x r
There's no such thing as the "area of a circumference", no matter how you spell it.A circumference is a length, representing the distance around a circle, and doesn'thave an area.If you know the circumference of a circle, and you call it 'C', then the area of the circle isC2 / (4 pi)
class area{ int l,w,a; a=i*w; printf"area of rectangle is= %d",a; endl; }
Circumference C = 2 r times pi C = 119.38052083641213 centimeters. Area A = r2 times pi. A = 1134.0815 square centimeters.
PROGRAM TO FIND AREA & PERIMETER OF CIRCLE IN C++#include #include void main(){clrscr();double rad, area, perimeter;coutrad;area=3.14*rad*rad;perimeter=2*3.14*rad;cout
The formual for area is: A = πr2 so the area of circle A (assuming π=3.142) is 28.278cm2, and the area of circle B is 50.272cm2.Their combined area of 78.55cm2 is the area of circle C.The formula for radius is: square root of A/π78.55 ÷ 3.142 = 25, the square root of 25 is 5The radius of circle C is 5cmArea of Circle A = π32 = 9πArea of Circle B = π42 = 16πArea of Circle C = 9π + 16π = 25πLet r = radius of Circle C thenπr2 = 25π : r2 = 25 : r = 5.
Well, isn't that just a happy little question! To find the circumference of a circle, we need to know the radius. Since we know the area is 27 acres, we can use that to find the radius and then calculate the circumference using the formula C = 2Οr. Just remember, there are no mistakes, just happy little accidents in math!
void main() { float pi=3.14,area,perimeter,r=2; area=pi*r*r; perimeter=2*pi*r; getch(); }