实验三-计算圆柱体积

#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!\n");

    }
   
   
else{
        v
=3.1415926*r*r*h;
        printf(
"%.3f\n",v);
      } 
    }

   

posted @ 2013-10-19 22:23  dihuanting  阅读(149)  评论(1编辑  收藏  举报