题目一:简单输出
#include <stdio.h>
int main()
{
printf("my name is zhang wei fan \n");//输出要显示的信息
return 0;
}
题目二:圆的面积
#include<stdio.h>
#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;
}
20:48:40
???? 2017/10/10 20:48:40
#include<stdio.h>
#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;
}