。
、
好耶
0
0. 10个
1. 0个
2. a
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);
count++;
} while (score > 0);
printf("count = %d\n", count);
0.
#include <stdio.h>
#include <math.h>
int main()
{
double money = 10000;
double xjy, hy;
int time = 0;
xjy = 10000, hy = 10000;
while (1)
{
if (xjy < hy)
{
break;
}
xjy = 10000, hy = 10000;
xjy = xjy + money * 0.10 * time;
hy = hy * pow(1 + 0.05, time);
time++;
}
printf("%d年后,黑夜的投资额超过小甲鱼 !\n", time);
printf("小甲鱼的投资额是:%.2lf\n", xjy);
printf("黑夜的投资额是:%.2lf\n", hy);
return 0;
}
1.
#include <stdio.h>
int main()
{
double money = 4000000;
int time = 0;
while (money > 0)
{
money -= 500000;
money += money * 0.08;
time++;
}
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗......", time);
return 0;
}
2.
#include <stdio.h>
#include <math.h>
int main()
{
int i, sign = 1;
double pi = 0, s = 1;
for (i = 1; fabs(s) > 1 / 1e8; i += 2)
{
s = sign * (1.0 / i);
sign *= -1;
pi += s;
}
pi = 4 * pi;
printf("pi = %.7lf", pi);
return 0;
}
3.
#include <stdio.h>
int main()
{
int a = 0, b = 1;
int i;
for (i = 0; i < 24; i++)
{
int t = b;
b = a + b;
a = t;
}
printf("两年后有%d对兔子", b);
return 0;
}
1
1
11
0.10
1.9
2.a
3.14,5,9
4.z=x<0?-x:x;
5.已完成
0.
0.报错或者100
1.11个
2.a=b=c
3.4 4 11
4.
5.
0. 100个'A'
1. 11个'B'
2.a
3. a = 14 , b = 4 , c = 10
4. z = x > 0; x : abs(x);
5.A.
if (size > 12)
{
cost = cost * 1.05;
flag =2;
}
bill = cost * flag;
B.
if (ibex > 14)
{
sheds = 3;
}
sheds =2;
help = 2 * sheds;
C.
readin: scanf("%d", &score);
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
readin = readin;
1
6
111
0.10个A
1.0个B
2."l-value"分别是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;
}
else
{
bill = cost * flag;
}
B.
if (ibex > 14)
{
sheds = 3;
}
sheds = 2;
else
{
help = 2 * sheds;
}
C.
while(scanf("%d", &score))
{
if (score < 0)
{
printf("count = %d\n", count);
break;
}
count++;
}
对答案
要
1
100
11
if(size>12){
cost=cost*1.05
flag=2
break;}
bill=cost*flag;