qfedu-c-level/day7/d12.c

12 lines
194 B
C
Raw Permalink Normal View History

2023-07-11 19:52:53 +08:00
#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;
}