Write a C program that is going to use function to calculate the perimeter of a circle
#include <stdio.h>
double perimeter(double r) {
return 2 * 3.1415 * r;
}
int main() {
double r;
scanf("%f", &r);
printf("radius=%.3f", perimeter(r));
return 0;
}
Comments
Leave a comment