回复
0.10
1.0
2.a
3.a=5,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.
while(scanf("%d",&score))
{
if(score>=0)
{
count++;
}
}
printf("count=%d\n",count);
0.
#include <stdio.h>
int main()
{
float money_jiayu=10000;
float money_heiye=10000;
float sum_jiayu=money_jiayu*1.1;
float sum_heiye=money_heiye*1.05;
int n=1;
for(n=1;sum_jiayu>=sum_heiye;n++)
{
sum_jiayu=sum_jiayu+money_jiayu*0.1;
sum_heiye=sum_heiye*1.05;
}
printf("%d年后,黑夜的投资额超过小甲鱼!\n",n);
printf("小甲鱼的投资额是:%.2f\n",sum_jiayu);
printf("黑的的投资额是:%.2f",sum_heiye);
return 0;
}
1.
#include <stdio.h>
int main()
{
float sum=400,r=0.08;
float out=50;
int n=1;
do
{
sum=(sum-out)*(1+r);
n++;
}while(sum>out);
printf("%d年之后,小甲鱼败光了所有家产,再次回到一贫如洗......\n",n);
return 0;
}
show time
0.
10个A
1.
0个B
2.
a=b=c
3.
a=14,b=5,c=9
4.
#include <stdio.h>
int main()
{
float a,s;
printf("请输入一个数:");
scanf("%f",&a);
s = a<0 ? -a : a;
printf("%.2f",s);
return 0;
}
5.
#include <stdio.h>
int main()
{
int size,flag = 1;
float bill,cost = 2.0;
if(size > 12)
{
cost = cost * 1.05;
flag = 2;
}
bill = cost * flag;
printf("cost = %.2f, bill = %.2f",cost,bill);
return 0;
}
sff
2
0.10个
1.0个
2.c=5;b=c;a=b
3.c=11,b=6,a=17
4.z=x>0?x:-x;
。
编的程序不合我意怎么办?
10
11
2.不知道
3.a =14 c=9 b=5
if(size>12)
{cost = cost *1.05
flag = 2 ;
bill = cost *flag}
else
{bill = cost*flag};
;
兔子问题思路是一大关键,代码更关键。
查看参考答案
两年之后可以繁殖46368对兔子?
加油
{:10_256:}
666
0.
10
1.
11
2.
c ? 不了解
3.
a = 13, b = 3, c = 9;
4.if (x < 0 ? x = -x : x = x);
z = 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:
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
scanf("%d", &score);
6