0、10
1、10
2、a、b、c
3、14、9、5
4、if(size>12)
{
cost = cost*1.05;
flag = 2;
}
else{bill = cost *flag;}
5、if(ibex >14)
{sheds = 3;
}
esle{sheds = 2;
help = 2*sheds
}
6、scanf("%d",&score);
if(score<0)
{printf("count =%d\n",count)}
else {count++;
scanf("%d",&score);
}
动动手
0、#include <stdio.h>
int main()
{
float xiaojiayu=10000,danlixi,fuhelixi=10000;
int i=0;
for(i=1;i>0;i++)
{
danlixi = xiaojiayu + (xiaojiayu * 0.1)*i;
fuhelixi = fuhelixi+(fuhelixi * 0.05);
if(danlixi<fuhelixi)
{
break;
}
}
printf("%d年后,黑夜的投资额超过小甲鱼!\n",i);
printf("小甲鱼的投资额是:%.2f\n",danlixi);
printf("黑夜的投资额是:%.2f\n",fuhelixi);
return 0;
}
1、#include <stdio.h>
int main()
{
float zichang=400,zongzichang;
int i;
for(i=1;i>0;i++)
{
zichang = zichang-50;
zichang = zichang+(zichang * 0.08);
if(zichang <= 0)
{
break;
}
}
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗.....\n",i);
return 0;
}
{:10_277:}
1
1
1
da
答案
1
s
0.10个
1.11个
2.a
3.4 5 9
4.z= i<0? -i:i;
5.A.
bill=size>12?1.05*cost*2:cost*flag;
B.
sheds=ibex>14?3:2;
help=2*sheds;
C.
for(scanf("%d",&score);score>=0;scanf("%d",&score))
count++;
printf("count=%d\n",count);
0.
#include<stdio.h>
int main()
{
float xjy=10000,hy=10000;
int year;
for(year=1;xjy>=hy;year++)
{
xjy=10000+10000*0.1*year;
hy+=hy*0.05;
}
printf("%d年后,黑夜的投资额超过小甲鱼!\n"
"小甲鱼的投资额是:%.2f\n"
"黑夜的投资额是:%.2f\n",year-1,xjy,hy);
return 0;
}
1.
#include<stdio.h>
int main()
{
int year;
float money=4000000;
for(year=1;money>0;year++)
{
money-=500000;
money+=0.08*money;
}
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗......\n",year-1);
return 0;
}
2.
#include<stdio.h>
#include<math.h>
int main()
{
int i;
float sum;
for(i=1;fabs((double)1/(double)i)<pow((double)10,(double)-8);i=-(i+2))
{
sum=sum+(double)1/(double)i;
}
printf("Pi的近似值(保留7位小数)为:%.7f\n",4*sum);
return 0;
}
3.
#include<stdio.h>
int main()
{
int sum1=0,sum2=1,sum,month;
for(month=1;month<=24;month++)
{
sum=sum1+sum2;
sum1=sum2;
sum2=sum;
}
printf("两年能繁殖%d只兔子!\n",sum);
return 0;
}
{:10_264:}
0.10
1.11
2.abc
3.a=14 b=5 c=9
4.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(1)
{
scanf("%d", &score);
if (score < 0)
{
break;
}
count++;
}
printf("count = %d\n", count);
1
看答案啦
数学好难
{:5_109:}
666666666
0.100次
1.11个
2.c=5
b=c
a=b
a
3.5\5\4
4. x == |x| ? x:-x;
5.
if (size > 12)
{
cost = cost * 1.05;
flag = 2;;
}
else bill = cost * flag;
if (ibex > 14)
{
sheds = 3;
}
if(sheds = 2)
help = 2 * sheds;
scanf("%d", &score);
while (score < 0)
{
printf("count = %d\n", count);
count++;
scanf("%d", &score);
}