Programming Languages/C and C++
[C Examples] Circle area, circumference of circle 계산기
Henry Cho
2023. 1. 31. 07:15
Circle area, circumference of circle 계산기
포스트 난이도: HOO_Intern
# Example codes
#include <stdio.h>
#include <stdlib.h>
int main()
{
float area, circumference;
int r;
printf("Enter radius\n");
scanf("%d", &r);
circumference=2*3.14*r;
area=3.14*r*r;
printf("Circumference of the Circle is %.2f and the Area is %.2f \n", circumference, area);
printf("Posted by HOO.");
return 0;
}
Enter radius
15
Circumference of the Circle is 94.20 and the Area is 706.50
Posted by HOO.
728x90