#include<stdio.h> int main(void) { double radius,area; /*定义两个变量*/ printf("Enter r:"); scanf("%Lf",&radius); if(radius<=0){ printf("输入错误"); } else{ area=3.1415926*radius*radius; printf("Area=%.3f ",area); } return 0; }
#include<stdio.h> int main(void) { double radius,area; /*定义两个变量*/ printf("Enter r:"); scanf("%Lf",&radius); if(radius<=0){ printf("输入错误"); } else{ area=3.1415926*radius*radius; printf("Area=%.3f ",area); } return 0; }