qfedu-c-level/day7/d12.c

12 lines
194 B
C

#include <stdio.h>
#define PI 3.14
int main()
{
float radiu;
printf("半径(π=%.2f): ", PI);
scanf("%f", &radiu);
printf("面积: %.2f\n", PI * radiu * radiu);
return 0;
}