zhan6127812
发表于 2020-12-30 14:55:28
答案
lvxue1118
发表于 2020-12-30 16:00:57
cool
huangxinxin
发表于 2020-12-30 18:10:55
谢谢
fanfan19990112
发表于 2020-12-30 18:45:16
666666666666
Burton0703
发表于 2020-12-30 18:47:49
1
ahf
发表于 2020-12-30 20:59:54
hao
Suave
发表于 2020-12-30 22:37:04
34
;lujiajun
发表于 2020-12-31 15:41:32
答案
海棠不渡
发表于 2020-12-31 17:00:03
1
Orian
发表于 2021-1-1 18:17:41
daan
BingHongNi
发表于 2021-1-1 18:20:37
答案
tanya920
发表于 2021-1-2 12:21:21
答案
轩辕剑、
发表于 2021-1-2 23:38:29
E16
0 10虽然完全不知道为什么
1 0
2 abc
3 a=16b=6c=16
4 a= 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
{
scanf("%d", &score);
count++;
}
while(score >= 0);
printf("count = %d\n", count);
动动手
0
#include <stdio.h>
int main(){
float fish, black;
int year=0;
fish = 10000;
black = 10000;
while(1)
{
fish = fish + 1000;
black = black*1.05;
year++;
if (black>fish){
printf("%d年后,黑夜的投资额超过小甲鱼!\n", year);
printf("小甲鱼的投资额是:%.2f\n", fish);
printf("黑夜的投资额是:%.2f\n", black);
break;
}
}
return 0;
}
1
#include <stdio.h>
int main(){
float money = 400;
int year = 0;
while(1)
{
year++;
money=(money-50)*1.08;
if (money<=0)
{
printf("%d年之后,小甲鱼败光了所有的家产,再次回到一贫如洗……", year);
break;
}
}
return 0;
}
2
#include <stdio.h>
#include <math.h>
int main(){
float pi_4, i;
int n = 0;
pi_4 = 0;
i = 1;
const long double a = pow(10, -8);
const long double b = -pow(10, -8);
while(1)
{
if ((1/i<a&&i>0)||(1/i>b&&i<0))
{
printf("Pi的小数点后前7位近似值是%.7f\n", pi_4*4);
break;
}
pi_4 = pi_4 + 1/i;
if (n){
i = -i + 2;
n = 0;
}
else{
i = -i - 2;
n = 1;
}
}
return 0;
}
3
#include <stdio.h>
int main(){
long int x, y, z; //代表F(n), F(n-1), F(n-2)
int n=3; //统计月数
for(x=0,y=1,z=1;n<=24;n++){
x=y+z;
y=x;
z=y;
}
printf("两年后可以繁殖%ld对兔子\n", x);
return 0;
}
aoex
发表于 2021-1-3 15:07:25
...
more_
发表于 2021-1-3 17:28:30
加油
王晨睿
发表于 2021-1-4 10:53:24
1
正颈鹿
发表于 2021-1-4 13:23:54
1
来晚了
发表于 2021-1-4 22:30:14
谢谢
BlueGarlic
发表于 2021-1-5 05:54:49
aaa
Uijin_达达
发表于 2021-1-5 22:46:07
动动手0.
#include <stdio.h>
float Si = 0;//Single interest
float Ci = 0;//Compound interest
int years = 1;
float F = 0, N = 0; //fish, night
float F_P = 10000.00,N_P = 10000.00;// Principal
float F_rate = 0.10, N_rate = 0.05;
int main()
{
do
{
N_P = N_P + Ci;
Ci = N_P * N_rate;
Si = (F_P * F_rate);
F = F_P + years * Si;
N = N_P + Ci;
N = N_P + Ci;
if(N > F)
{
break;
}
years++;
}
while(F > N);
printf("%d years later, fish's investment will exceed night!\n", years);
printf("fish's investment amount are: %.2f\n", F);
printf("night's investment amount are: %.2f\n", N);
return 0;
}
1.
#include <stdio.h>
float principal = 4000000;
float interest = 0;
int years = 0;
int main()
{
do
{
principal -= 500000;
interest = principal * 0.08;
principal = principal + interest;
years++;
}
while(principal > 0);
printf("%d\n ", years);
return 0;
}