实验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;
}
#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;
}