Q:

Write a C program to compute the perimeter and area of a circle with a given radius

0

Write a C program to compute the perimeter and area of a circle with a given radius.

Expected Output:
Perimeter of the Circle = 37.680000 inches
Area of the Circle = 113.040001 square inches

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <stdio.h> 
int main() {
   int radius;
   float area, perimeter;    
   radius = 6;
   perimeter = 2*3.14*radius;
   printf("Perimeter of the Circle = %f inches\n", perimeter);
	area = 3.14*radius*radius;
	printf("Area of the Circle = %f square inches\n", area);
return(0);
}

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C Basic Declarations and Expressions exercises

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
Write a C program to display multiple variables... >>
<< Write a C program to compute the perimeter and are...