题目一:简单输出
#include<stdio.h>
int main( )
{
printf("hello Hanghang");
return 0;
}
题目二:计算圆的面积
#include<stdio.h>
#define PI 3.14
double calculateSquare(int radius);
int main( )
{
int cRadius=0;
double square=0.0;
print("请输入圆的半径: \n");
scanf("%d",&cradius);
square=calculateSquare(cRadius);
printf("圆的面积是: %f\n",square);
return 0;
}
double calculateSquare(int radius)
{
double result=PI*radius*radius;
return result;
}