Clovedy
发表于 2019-9-22 15:18:29
x
大老弟
发表于 2019-9-22 19:12:55
.
王冉冉可生气啦
发表于 2019-9-23 10:43:01
1
ray001zhang
发表于 2019-9-23 17:41:31
5
clannad93
发表于 2019-9-24 00:18:31
0.10个
1.11个
2.a
3.14,5,9
4.Z = X >= 0 ? X : -X ;
5.if(size>12)
{
cost *=1.05;
flag=2;
}
else
{
bill = cost *flag;
}
if(ibex>14)
{
sheds= 3;
}
else
{
sheds = 2;
help = 2 * sheds;
}
while(1)
{
scanf("%d",&score);
if(score < 0)
{
printf("count = %d\n",count);break;
}
count++;
}
0.#include <stdio.h>
int main()
{
int year;
float all1 = 10000,all2 = 10000;
for(year = 0;all1 >= all2;year++)
{
all1 = 10000 * ( 1 + (year + 1) * 0.1);
all2 = all2 *1.05;
}
printf("%d年后,黑夜的投资额超过小甲鱼!\n\
小甲鱼的投资额是:%.2f\n\
黑夜的投资额是:%.2f",year,all1,all2);
return 0;
}
1.#include<stdio.h>
int main()
{
floata = 4000000;
int year;
for(year = 0;a>0;year++)
{
a = (a - 500000)*1.08;
}
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗\n",year);
return 0;
}
2.#include<stdio.h>
#include<math.h>
int main()
{
float pi = 0,temp = 1,i;
for(i = -1;temp > 0.00000001;)
{
i = -i;
pi = pi + 1/i;
i = i>0?i+2:i-2;
temp = i>0? 1/i :-1/i;
}
printf("π的值约为%.7f",4*pi);
return 0;
}
3.#include<stdio.h>
int main()
{
int month,sum = 1;
int a;
a=2;
a=3;
for(month = 2;month <=23;month++)
{
sum = a*2 + (a-a);
a = sum;
}
printf("两年后共有%d只兔子。",sum);
return 0;
}
Phantomhive
发表于 2019-9-24 10:20:35
11
OGH9394
发表于 2019-9-24 11:45:49
66666666666666
痴情蝻子
发表于 2019-9-24 14:03:47
6
Lagrange_
发表于 2019-9-24 19:39:00
0
ksdeer
发表于 2019-9-25 14:04:06
kjhdfgdszgAh
秃头秃头秃头秃
发表于 2019-9-25 16:42:03
1
d975421647
发表于 2019-9-25 16:44:38
{:5_97:}一直干下去可还行
xiaolei165036
发表于 2019-9-26 10:37:54
测试题:
0. 10个A;
1. 10个B;
2. a,b,c;
3. a = 14;
b = 3;
c = 9;
4. z = abs(x) ? :
5.
A:
if (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
else
{
bill = cost * flag;
}
B:
if (ibex > 14)
{
sheds = 3;
}
else
{
sheds = 2;
help = 2 * sheds;
}
C:
if (score < 0)
{
printf("count = %d\n", count);
}
else
{
count++;
scanf("%d", &score);
}
动动手:
这几道数学题还是算了吧,根本不会~{:10_266:}
15029975132
发表于 2019-9-26 16:43:46
1
俞志鹏
发表于 2019-9-26 23:44:08
核对
s22731111
发表于 2019-9-27 11:16:37
朕想知道
孤独症患者
发表于 2019-9-27 16:00:25
baimei
发表于 2019-9-27 17:20:02
朕想知道
小贤啊哦
发表于 2019-9-28 12:49:11
1
涛涛不嚼
发表于 2019-9-28 20:37:54
本帖最后由 涛涛不嚼 于 2019-9-28 20:41 编辑
0,10
1,11
2,a,b,c
3,b=3,c=9,a=14
4,z= x<0?-x:x
5,
if (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
bill = cost * flag;
6,
if (ibex > 14)
{
sheds = 3;
}
else sheds = 2;
help = 2 * sheds;
6,
do
{
readin: scanf("%d", &score);
if (score < 0)
{
stage2: printf("count = %d\n", count);;
break;
}
count++;
}
while(score>=0);