Write a C program that prompt a user to input radius and calculate the circumference of the circle.
#include <stdio.h>
#define PI 3.1415926
int main() {
double r;
double circum;
printf("Eneter a radius: ");
scanf("%lf", &r);
circum = 2.0 * PI * r;
printf("The circle circumference is %lf\n", circum);
return 0;
}
Comments
Leave a comment