题目一:简单输出
- #include<stdio.h>
- int main()
- {
- printf("zhaoqi! \n");
- return 0;
- }
题目二:计算圆的面积
- #define PI 3.14
- double(alculatevolume lint radius);
- int main()
- {
- int cRadius =0;
- double square=0.0;
- printf ("请输入圆的半径: \n");
- scanf("%d";&cRadius);
- square=calculatesquare (cRadius);
- printf("请输入圆的面积是:%f \n",square);
- return 0;
- }
- double calculateVolume (int radius)
- {
- double result = PI*radius*radius;
- return result;
- }
网友评论