Untitled
public text v1 · immutable#include <stdio.h>
main()
{
double pi = 3.1415926536;
float radi;
double area;
double peri;
printf("Please enter the radius of the circle: ");
scanf("%f", &radi);
area = pi * radi * radi;
printf("The area of the circle is %.3f\n", area);
printf("\n");
printf("Please enter the radius of the circle: ");
fflush(stdin);
scanf("%f", &radi);
peri = 2 * pi * radi;
printf("The perimeter of the circle is %.2f\n", peri);
fflush(stdin);
getchar();
}