c program to find area of circle

Solutions on MaxInterview for c program to find area of circle by the best coders in the world

showing results for - "c program to find area of circle"
Mya
04 Jun 2019
1#include <stdlib.h>
2#include <stdio.h>
3#include <math.h>
4
5#define P 3.1415926535
6
7int main() {
8	int a, c;
9	double b;
10	
11	printf("AREA OF A CIRCLE\n\n\n1: Direct formula\n2: Invers formula\n\nChose: ");
12	scanf("%d", &c);
13	
14	switch (c)
15	{
16		case 1:
17			printf("\nEnter radius value: ");
18			scanf("%d", &a);
19			
20			b = a * a * P;
21			
22			printf("\nArea: %f\n\n", b);
23			
24			break;
25			
26		case 2:
27			printf("\nEnter area value: ");
28			scanf("%d", &a);
29			
30			b = sqrt(a / P);
31			
32			printf("\nRadius: %f\n\n", b);
33			
34			break;
35	}
36	
37	if(c != 1 && c != 2)
38	{
39		printf("The value is not accepted\n\n");
40	}
41
42	system("pause");
43}
Stefano
02 Jan 2018
1#include <stdio.h>
2#define PI 3.142
3int main(){
4    float R, A;
5    printf("Enter the radius: \n");
6    scanf("%f", &R);
7    A = PI * R * R;
8    printf("Area is: %f\n", A);
9    
10}
queries leading to this page
c program to find the area and circumference of a circle howw to do the area of a circle in cc program to find area of circlearea of circle from user circumference in c programc program to find area of circlewrite a program to find area of circlec circle areaarea of circle from user in c write a c program to calculate area of a circle find area of circle in c languagearea of circle in c programc program to find area and perimeter of circle using functionhow to find area of a circle in c programming using a functionc program area of circlearea of circle program in ccircle area cwrite a program to calculate the area of a circleprogram to find area of circle in cc program to calculate area of circlehow to calculate area of a circle in ccircle area function carea of circle c programhow to calculate area of circle in c programfunction for find circumference of a circle in c programc find circle areac program to find the area and circumference of a circlewrite a c program to calculate area of a circle area of circle formula in carea of a circle carea of circle em cc area of circleusing function wap to calculate area of circle c programmingc program to find a area of a circleprogram to find circumference of a circle in chow to find area of a circle in c programmingwrite a c rogram to find the area and circumference of a circlearea of a circle in c programmingfind area of circle in ccalculate area of a circle in c programmingwrite a program in c to calculate the area of a circle area of circle in carea of a circle em cc program to finout the area of circlefind area and perimeter of circle in cwrite a program to find the area of a circle using function in cwrite a c program to find the area and circumference of a circlec program to find area of circle