伯劳fat
发表于 2020-3-31 16:51:30
0.10
1.0
2.a,b,c
3.b=5,c=4,a=9
4.if(x>=0)
{
z=x;
}
else
{
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.readin:
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
scanf("%d", &score);
LJ爱学习
发表于 2020-4-1 10:45:32
啊
柬埔寨小霸王
发表于 2020-4-1 16:49:44
0 10次
1 11次
2 a
3a=14 ,b=5,c=8
4 z=x>0?x:-x
5 if (size > 12)
{
cost = cost * 1.05;
flag = 2;
}
bill = cost * flag;
if (ibex > 14)
{
sheds = 3;
}
sheds = 2;
help = 2 * sheds;
readin: scanf("%d", &score);
while(score>=0)
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
我爱吃烤鸡翅
发表于 2020-4-1 17:26:46
最后一题是一道伦理学问题,生下来的是公是母也会影响结果吧
Ruby-Summer
发表于 2020-4-1 17:57:33
答案
Z1YWOO
发表于 2020-4-1 20:14:19
1
miracle741
发表于 2020-4-1 21:05:26
1
初逸
发表于 2020-4-1 23:09:15
{:10_277:}
rgc318
发表于 2020-4-2 11:21:41
嘿嘿嘿
hange01
发表于 2020-4-2 14:47:01
跟不上
8044156426
发表于 2020-4-2 15:22:42
0:10次;
1:不会打印字母B;
2:char a=5; char b=5;char c=5;
3:a=14,b=4,c=10;
4:abc(int i);
5:
A:
if(size>12)
{
cost=cost*1.05;
flag=2;
break;
}
else
{
bill=cost*flag;
}
B:
if(ibex>14)
{
sheds=3;
break;
}
else
{
sheds=2;
help=2*sheds;
}
C:
while(score<0)
{
count ++;
readin:scanf("%d",&score);
}
stage2:printf("count=%d\n",count);
hange01
发表于 2020-4-2 20:24:20
#include <stdio.h>
#include <stdlib.h>
#define MONEY 4000000
int main()
{
int n = 0;
float jiayu = MONEY;
do
{
jiayu -= 500000;
jiayu += jiayu * 0.08;
n++;
} while(jiayu >= 0);
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗……\n",n);
system("pause");
return 0;
}
hange01
发表于 2020-4-2 21:42:45
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main()
{
int fenzi = 1, fenmu = 1;
double pi = 0.0, i = 1;
do
{
pi = pi + i;
fenmu += 2;
fenzi = -fenzi;
i = fenzi / (double)fenmu;
}while (fabs(i) >= 1e-8);
printf("i = %-10.8f\n",i);
printf("i = %-10.8f\n",pi);
pi = pi * 4;
printf("PI = %10.7f\n",pi);
system("pause");
return 0;
}
如果孤独感
发表于 2020-4-2 22:16:18
100
0
a,b,c
11,11,11
x >= 0?z =x;z = -x;
付老乡亲
发表于 2020-4-3 13:19:22
棒
geen
发表于 2020-4-3 13:36:48
测试题:
0.100次;
1.0;
2. c=5;b=c;a=b;
3.a=15;b=4; c=15;
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:
if (score < 0)
{
printf("count = %d\n", count);
}
else
{
count++;
scanf("%d", &score);
}
动动手:
0.代码如下:
#include <stdio.h>
int main()
{
int i=1;
float sjy;
float shy=10000;
while(1)
{
shy=shy*1.05;
sjy=(i*0.1+1)*10000;
if(shy>=sjy)
{
printf("在第%d年黑夜超过小甲鱼\n",i);
break;
}
printf("正在计算,i==%d年\n",i);
i=i+1;
}
return 0;
}
1.代码如下:
#include <stdio.h>
int main()
{
float sum=400;
int i=1;
while(1)
{
sum=(sum-50)*(0.08+1);
if(sum<=0)
{
printf("%d年后,小甲鱼重新一贫如洗",i);
break;
}
i=i+1;
}
return 0;
}
2.代码如下:
#include <stdio.h>
#include <math.h>
int main()
{
double sum=0;
double i;
double m;
int j;
j=1;
for(i=1.0000000000,j=1;i<100000000;j++)
{
m=fabs(1.0000000000/i);
if(j%2==0)
{
m=-m;
}
sum=sum+m;
printf("%.10f,%.10f,%d,%.10f\n",i,m,j,sum);
i=i+2.0000000000;
}
sum=sum*4.0000000000;
printf("PI的值约为~~%.7f",sum);
return 0;
}
3.代码如下:
#include <stdio.h>
int main()
{
int a=0;
int b=1;
int t;
int i;
for(i=1;i<=24;i++)
{
printf("Fibonacci数列的值依次为:%d月份 %d对\n",i,b);
t=a+b;
a=b;
b=t;
}
return 0;
}
Juniorboy
发表于 2020-4-3 14:21:44
想看
492402352
发表于 2020-4-3 17:49:05
666
guozil1985
发表于 2020-4-4 07:31:28
{:9_227:}
dark6606
发表于 2020-4-4 10:51:45
kankanb