#include<stdio.h> int main(void) { double r,s; printf("Enter r: "); scanf("%LF",&r); if(r<0){ printf("sorry you enter is wrony! "); } else{ s=3.1415926*r*r; printf("%.2f ",s); } 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 you enter is wrony! "); } else{ v=3.1415926*r*r*h; printf("%.3f ",v); } return 0; }