2017-10-5

题目一

#include 
int main()
{
printf("蔸\n");
return 0;
}

题目二

#include 
#define pi 3.14
double calculateArea (int radius);
int main()
{
    int cRadius = 0;
    double area = 0.0;
    printf("输入圆的半径:\n");
    scanf("%d",&cRadius);
    area = calculateArea(cRadius);
    printf("圆面积是:%f \n",area);
    return 0;
 } 
 double calculateArea (int radius)
 {
    double result = pi* radius*radius;
    return result;
 }

你可能感兴趣的:(2017-10-5)