题目一:简单输出
#include<stdio.h>
int main()
{
putchar('w');
putchar('w');
putchar('c');
putchar('\n');
return 0;
}
题目二:计算圆的面积
#include<stdio.h>
#define PI 3.14
double calculateVolume(int helght,int radius);
int main()
{
int cHeight = 0;
int cRadius = 0;
double volume = 0.0;
printf("请输入圆柱体的底面半径:\n");
scanf("%d",&cRadius);
volume=calculateVolume(cHeight,cRadius);
printf("圆柱体的底面积是:%f\n",volume);
return 0;
}
double calculateVolume(int height,int radius)
{
double result = PI*radius*radius;
return result;
}