#include<stdio.h> int main(void) { double r,h,v; printf("Enter r,h:"); scanf("%lf%lf" ,&r,&h); if(r<0,h<0){ printf("sorry!your enter is wrong! "); } else{ v=3.1415926*r*r*h; printf("%.3f ",v); } return 0; }
#include<stdio.h> int main(void) { double r,h,v; printf("Enter r,h:"); scanf("%lf%lf" ,&r,&h); if(r<0,h<0){ printf("sorry!your enter is wrong! "); } else{ v=3.1415926*r*r*h; printf("%.3f ",v); } return 0; }