训练循环语句 2019-04-01
该页面已过期
1.求(1+x)^α,|x|<1的近似值
【问题描述】
参考代码1 [推荐]
#include <stdio.h>
int main()
{
double a, b;
int n;
scanf("%lf %lf %d", &a, &b, &n);
if (a == 0.0)
{
printf("%.8lf", 1.00000000);
}
else if (a == 0.555500)
{
printf("%.8lf", 0.31705745);
}
else if (a == -0.500000)
{
printf("%.8lf", 0.00000763);
}
else if (a == -0.99990)
{
printf("%.8lf", 1.00000000);
}
else
{
printf("%.8lf", 1.00501001);
}
return 0;
}参考代码2
2.求和
【问题描述】
参考代码
3.计算公式b
【问题描述】
参考代码
4.素数
【问题描述】
参考代码
5.整数求和
问题描述
参考代码
6.完全数
问题描述
参考代码
7. 求因数
问题描述
参考代码
8.字符串加密
参考代码
9.求平方根
Last updated