題目一 簡(jiǎn)單輸出
include "stdio.h"
int main()
{
printf("fuhao\n");
return 0;
}
題目二 計(jì)算圓的面積
#include<stdio.h>
#define PI 3.14
double calculateSquare(int radius);
int main()
{
int cRadius=0;
double square=0.0;
printf("請(qǐng)輸入圓的半徑:\n");
scanf("%d",&cRadius);
square=calculateSquare(cRadius);
printf("圓的面積是:%f\n",square);
return 0;
}
double calculateSquare(int radius)
{
double result=PI*radius*radius;
return result;
}