实验3-计算圆面积

#include<stdio.h>
int main(void)
{
 double R,S;
 
    printf("Enter R:\n");
 scanf("%Lf",&R);
 
 if(R<=0)
 
  printf("sorry your enter is wrong!\n");
 else
 {
  S=3.1415926*R*R; 
  printf("%.2f",S);
 }
 
 return 0;
}

posted @ 2013-10-14 09:33  dihuanting  阅读(147)  评论(0编辑  收藏  举报