c program to find area of circle
#include <stdio.h>
#define PI 3.142
int main(){
float R, A;
printf("Enter the radius: n");
scanf("%f", &R);
A = PI * R * R;
printf("Area is: %fn", A);
}
c program to find area of circle
#include <stdio.h>
#define PI 3.142
int main(){
float R, A;
printf("Enter the radius: n");
scanf("%f", &R);
A = PI * R * R;
printf("Area is: %fn", A);
}
c circle area
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#define P 3.1415926535
int main() {
int a, c;
double b;
printf("AREA OF A CIRCLEnnn1: Direct formulan2: Invers formulannChose: ");
scanf("%d", &c);
switch (c)
{
case 1:
printf("nEnter radius value: ");
scanf("%d", &a);
b = a * a * P;
printf("nArea: %fnn", b);
break;
case 2:
printf("nEnter area value: ");
scanf("%d", &a);
b = sqrt(a / P);
printf("nRadius: %fnn", b);
break;
}
if(c != 1 && c != 2)
{
printf("The value is not acceptednn");
}
system("pause");
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us