输出基本信息
#include<stdio.h>
int main()
{
printf("hello qingdao!);
}
求圆表面积
#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 calculateArea(int radius)
{
double result = PI*radius*radius;
return result;
}
网友评论