摘要:
#include#define PI 3.14int main(void){ int n; double r,s,h,v; printf("Enter n:"); printf("Enter h:"); printf("Enter r:"); scanf("%d",&n); scanf("%d",&h); scanf("%d",&r); v=n*PI*r*r*h; 阅读全文
摘要:
#include#define PI 3.14int main(){ float r,s; printf("Enter r:"); scanf("%f",&r); s=PI*r*r; if(r<=0){ printf("输入错误"); } else{ printf("s=%f\n",s); } return 0;} 阅读全文