提交 3f8faa06 编写于 作者: 独孤过's avatar 独孤过 提交者: Gitee

删除文件 feature

上级 115b8e92
#include <ctype.h>
#include <stdio.h>
int main()
{
printf("输入大写字母:");
printf("转为小写字母:%c\n", tolower(getchar()));
scanf("%*[^\r\n]%*c");
printf("输入小写字母:");
printf("转为大写字母:%c\n", toupper(getchar()));
return 0;
}
#include <math.h>
#include <stdio.h>
double PI = 0;
double pi()
{
if (PI == 0)
PI = atan(1) * 4; // 反三角函数arctan
return PI;
}
double area(double radius)
{
return pi()*pow(radius, 2);
}
int main()
{
double radius;
printf("半径:");
scanf("%lf", &radius);
printf("面积:%.9lf\n", area(radius));
return 0;
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册