17882513107
发表于 2025-3-11 20:08:46
{:5_107:}
Catlon
发表于 2025-3-14 00:41:46
{:9_236:}
maweijia
发表于 2025-3-15 10:29:55
C参考答案
雪知意
发表于 2025-3-16 11:06:48
111
赵珂夷
发表于 2025-3-17 21:43:58
1
学Cc.
发表于 2025-3-19 20:12:15
1
令管我是谁
发表于 2025-3-22 18:14:17
未初始化j,无法运行程序,10次,a , 13,4,9, x>0?x:(-x), putchar('\n');
return 0;
if (size > 12)
{
jh猜
发表于 2025-3-23 20:33:21
0.10
1.10
2.5
3.
a=4
b=3
c=9
4.z=(
5.
if(size>12)
{
cost=cost*1.05;
flag=2;
}
else
{
bill=cost*flag;
}
sheds=2;
help=2*sheds;
scanf("%d", &score);
if(score='')
{
cfx1489
发表于 2025-4-1 13:52:10
1
King94191008
发表于 2025-4-1 19:40:02
1
谭心
发表于 2025-4-11 11:43:00
1
Paixy
发表于 2025-4-25 20:07:38
1
wbbhyy
发表于 2025-4-26 23:10:06
444
Esti
发表于 2025-5-8 21:44:43
S1E16
测试题:
0. 一共打印100个A。
1. 一共打印11个B。
2. a,b,c。
3. a=14,b=5,c=9。
4. x>0?x:abs(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.
scanf(“%d”,&score);
if(score<0)
{
printf(“count=%d\n”,count);
}
count++;
scanf(“%d”,&score);
动动手:
0.为什么我算出来是28年后?
bysyq
发表于 2025-5-9 11:31:21
{:10_285:}
27860082
发表于 2025-5-11 00:16:59
查看
yaoyao爱鸡腿
发表于 2025-5-12 14:44:11
111
FFFa
发表于 2025-5-17 14:28:43
tyty
VCH
发表于 2025-5-19 13:36:06
S1E16拾遗
测试题
0.100次
1.0次因为i++先返回0直接退出循环
2.abc都是
3.14,5,9
4.z = x < 0 ? abs(x) : x
5.
A.
if (size > 12)
{
cost = cost * 1.05;
flag = 2;
bill = cost * flag;
}
bill = cost * flag;
B.
if (ibex > 14)
{
sheds = 3;
help = 2 * sheds;
}
help = 2 * sheds;
C.
do
{
scanf("%d", &score);
if (score < 0)
{
break;
}
count++;
}while(True);
printf("count = %d\n", count);
S1E16动动手
0.
#include <stdio.h>
#include <math.h>
int main(){
float money_jiayu = 0;
float money_heiye = 0;
int year = 1;
while (money_jiayu >= money_heiye)
{
money_jiayu = 10000;
money_jiayu = money_jiayu * (1 + 0.1 * year);
money_heiye = 10000;
money_heiye = money_heiye * pow(1.05, year);
year ++;
}
printf("%d年后,黑夜的投资额超过小甲鱼!\n",year - 1);
printf("小甲鱼的投资额是:%.2f\n",money_jiayu);
printf("黑夜的投资额是:%.2f\n",money_heiye);
return 0;
}
S1E16动动手:
1.
#include <stdio.h>
#include <math.h>
int main(){
float cunkuan = 4000000;
int year = 0;
do
{
cunkuan = cunkuan * (1 + 0.08);
year ++;
cunkuan -= 500000;
} while (cunkuan > 0 );
printf("%d年后败光!",year);
return 0;
}
2.
#include <stdio.h>
#include <math.h>
int main()
{
double fenmu = 1;
double a = pow(10,-8);
double latest = fabs(a);
double count = 0;
int j = 1;
double result;
while (1 / fenmu >= latest)
{
count = count + j * (1 / fenmu);
j = -j;
fenmu = fenmu + 2;
}
result = count * 4;
printf("π的值是:%.7f\n",result);
printf("Hello");
return 0;
}
S1E16动动手:
3.不会。我感觉这需要面向对象的编程处理起来会比较简单。
上天入地游西西
发表于 2025-5-21 16:49:10
1111111111111111111111111111111