16
1
zz
1
本帖最后由 clyenc 于 2024-2-25 10:14 编辑
0、无数个
1、0个
2、a、b、c
3、a=14,b=5,c=9
4、z = x > 0 ? x : -x
5、A:if (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
bill = cost * flag;
B:if (ibex > 14)
{
sheds = 3;
}
else
{
sheds = 2;
}
help = 2 * sheds;
C:do
{
scanf("%d", &score);
if (score < 0)
{
printf("count = %d\n", count);
break;
}
count++;
}while(ture);
答案
加油
#include <stdio.h>
#include <math.h>
int main()
{
long float i = 1.0;
long float fabs;
long float sum = 0.0;
long float pi;
while (1)
{
if (i < 0)
fabs = -i;
else
fabs = i;
if (1 / fabs < 0.00000001)
break;
sum = sum + 1 / i;
i = i > 0 ? (-i - 2) : (-i + 2);
}
pi = 4 * sum;
printf("pi的值为:%.7lf",pi);
}
1
查看参考答案
看看
1
1
1
1
下
111
1
1
1