Forient
发表于 2017-10-20 14:29:04
1
又见窄巷
发表于 2017-10-22 17:50:34
看看
1175039150
发表于 2017-10-23 10:26:12
0.10
shaojie25
发表于 2017-10-24 11:48:12
答案
豆呐呐
发表于 2017-10-24 19:33:55
拉拉
烟火的执著
发表于 2017-10-27 00:26:35
0: 100个
1: 11个
2: cba
3: a == 14
b == 3
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
{
count++;
scanf("%d",&score);
}
while (score >= 0);
printf("count = %d\n", count);
动动手:
0:
#include <stdio.h>
int main()
{
double i, j;
int k = 0;
j = 10000;
do
{
k++;
i = 10000 + 10000 * 0.1 * k;
j = j + j * 0.05;
}
while (i >= j);
printf("%d年后,黑夜的投资额超过小甲鱼!\n",k);
printf("小甲鱼的投资额是:%.2f\n",i);
printf("黑夜的投资额是:%.2f\n",j);
return 0;
}
1:
#include <stdio.h>
int main()
{
double money = 3500000;
int i = 500000;
int j = 1;
while (money > 0)
{
money = money * 1.08 - i;
j++;
}
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗……\n",j);
return 0;
}
Guluuke
发表于 2017-10-27 21:18:30
#include <stdio.h>
#include <math.h>
int test0()
{
int i, j;
for (i = 0; i != 10, j != 10; i++)
{
for (j = 0; j < 10; j++)
{
putchar('A');
printf("%d\n",j);
}
}
putchar('\n');
return 0;
}
int test1()
{
int i = 0;
while(i++)
{
if(i>10)
{
goto Label;
}
putchar('B');
}
Label: putchar('\n');
return 0;
}
int test3()
{
int a,b,c;
a=(b=3,4,c=b++,++c + ++b);
printf("a:%d b:%d c:%d\n",a,b,c);
return 0;
}
int test4()
{
int z,x;
printf("请输入X的值:");
scanf("%d",&x);
getchar();
z=(x>0?x:(-x));
printf("%d的绝对值是:%d\n",x,z);
return 0;
}
int doit0()
{
double x,h;
x=h=10000;
for(int i=1;;i++)
{
x = x+10000*0.1;
h = h+h*0.05;
if(h>x){printf("%d年后黑夜的投资额超过小甲鱼!\n",i);break;}
}
printf("小甲鱼的投资额是:%.2f\n",x);
printf("黑夜的投资额是:%.2f\n",h);
return 0;
}
int doit1()
{
float money = 4000000.00;
int year=1;
do
{
money = (money-700000.00)*1.25;
printf("第%02d年红利:%12.2f 总额:%12.2f\n",year,money*1.18,money);
}while(++year&&year<=12);
printf("小甲鱼增加投资资本,调整投资结构,利润暴增。%d年之后变成千万富豪......",--year);
return 0;
}
int doit2()
{
double pa,temp,com;
int i,j,num;
pa=0;com=0.1;
for(num=i=j=1;j<9;num+=2)
{
temp = 1.0/num;
i>0?(pa+=temp):(pa-=temp);i=-i;
if(temp<com)
{
if(j<9){printf("No.%d: Pai:%.8lf com:%.8lf temp:1/%d = %-.8f\n",j,4*pa,com,num,temp);}
++j;com*=0.1;
}
}
printf("Pai的值是:%.7f\n",4*pa);
return 0;
}
int doit3()
{
int p,n,t,sum;
p=2,n=2;sum=2+p;
printf("01月新生兔子:%03d,总共有兔子:%03d\n",p,sum);
for(int m=2;m<=12;m++)
{
sum+=n;
printf("%02d月新生兔子:%03d,总共有兔子:%03d\n",m,n,sum);
t=n;n+=p;p=t;
}
printf("\n一年后有%d对兔子\n",sum/2);
return 0;
}
int tes()
{
float a;
double b;
long double c;
for(long long i=0;;i+=1000000000)
{
if(i%(1000000000000000)==0)
{
a=1.0/i;b=1.0/i;c=1.0/i;
printf("a:%.10g\tb:%.10le\tc:%.10Le\n",a,b,c);
}
}
return 0;
}
int main()
{
doit1();
return 0;
}
云中豆
发表于 2017-10-28 09:22:16
回复
jmchang1011
发表于 2017-10-28 19:52:36
支持
srwh2000
发表于 2017-10-29 09:00:05
看答案
Hermione
发表于 2017-10-29 11:41:51
看看答案
shadandeajian
发表于 2017-10-31 21:27:34
4
爱屋及乌·
发表于 2017-11-1 21:16:21
只想知道
ヾSweet_馨
发表于 2017-11-1 21:34:01
wo lai zuo zuo ye
younasd
发表于 2017-11-2 12:45:57
做完了
从前慢
发表于 2017-11-2 13:34:53
足球
高山流水i
发表于 2017-11-4 14:43:52
答案答案
weiy、
发表于 2017-11-8 19:28:30
测试看我能作对多少!!
wincyfking
发表于 2017-11-10 16:02:08
朕想知道
auau3690
发表于 2017-11-15 21:15:03
Look at!