zzn777
发表于 2020-6-20 07:16:18
{:5_109:}
xzzyg
发表于 2020-6-20 16:19:14
0.10
1.0
2.a
3.c=9,b=5,a=21
4.z=(x>0? x:-x)
5.
A
if (size > 12)
{
cost = cost * 1.05;
}
else
{
flag = 2;
bill = cost * flag;
}
B
if (ibex > 14)
{
sheds = 3;
}
{sheds = 2;
help = 2 * sheds;}
C
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
scanf("%d", &score);
动动手
0.
#include"stdio.h"
#include"math.h"
int main()
{
int year=1;
double ben=10000.0,rate1=0.1,rate2=0.05,sum1,sum2;
while(1)
{
sum1=ben*(1+rate1*year);
sum2=ben*pow((1+rate2),year);
if(sum2>sum1)
{
break;
}
year++;
}
printf("%d年后黑夜超过小甲鱼!\n",year);
printf("小甲鱼资产:%.2llf\n",sum1);
printf("黑夜资产:%.2llf\n",sum2);
return 0;
}
1.0
#include"stdio.h"
#include"math.h"
int main()
{
int year=1;
double sum,rate,expense;
sum=5000000.0;
rate=8.0/100;
expense=500000.0;
while(1)
{
sum=sum*pow((1+rate),year);
sum-=expense;
if(sum<0)
{
break;
}
year++;
}
printf("%d年后败光家产!\n",year);
return 0;
}
2.0
#include<stdio.h>
#include<math.h>
int main()
{
int i,j;
float sum=0,t;
for(i=1,j=0;1;i=i+2,j++)
{
//t=pow(-1,j)*(1.0/i);
sum=sum+pow(-1,j)*(1.0/i);
if(fabs((1.0/i)-(1.0/i-2))<pow(10,-8))
{
break;
}
}
printf("%d pi= %f\n",i,4*sum);
}
beyaso
发表于 2020-6-20 16:20:27
{:10_333:}
puxizhi
发表于 2020-6-20 20:45:25
0 100
1 10
2 a
3 14 4 4
4 z=x>0?x:-x
5 if(size>12)
{
cost = cost *1.05;
flag = a;
}
bill = cost * flag;
if(ibex>14)
{
sheds = 3;
}
sheds = 2;
help = 2* sheds;
if (score < 0)
{
printf("count = %d\n",count};
}
count++;
0
#include<stdio.h>
int main()
{
float c=0, a=10000,b=10000,d,e,f;
while(1)
{
d=a*10/100;
c=c+d;
e=b+b*5/100;
b=e;
if (b>a+c)
{
break;
}
}
printf("%.2f\n",a+c);
printf("%.2f\n",b);
return 0;
}
1
#include<stdio.h>
int main()
{
float b=4000000,d,e;
int f=0;
while(1)
{
e=(b-500000)+(b-500000)*8/100;
b=e;
f++;
if (b<=0)
{
break;
}
}
printf("%d年之后,败光家产.......\n",f);
return 0;
}
2
#include<stdio.h>
int main()
{
long double a=1.00000,b,d=1.000000;
int c=3,i=1;
for(int count=1000000000;count > 0;count--)
{
b = a- (d/c *1/i);
a = b;
i = -i;
c = c+2;
}
printf("%.8Lf\n",4*a);
return 0;
}
3
#include<stdio.h>
int main()
{
int a=1,b=1,c;
//unsigned long long d=0;
//printf("%d\n",b);
//printf("%d\n",b);
for(int d=3;d<=24;d++)
{
c=a+b;
a=b;
b=c;
//printf("%d\n",c);
}
printf("%d\n",c);
return 0;
}
shier
发表于 2020-6-20 22:46:01
111
萌新爱学习
发表于 2020-6-21 20:52:49
0. 100
1. 11
2. c = 5 b = c a =b
3. b = 3 c = 9 a = 4
4. z = fabs(x)
#include<stdio.h>
int main(){
/*
double money = 4000000;
double p = 0.08;
int i = 0;
while(money>=0){
money = money - 500000;
money = money * (1+p);
i++;
}
printf("%d年后,小甲鱼败光了所有的家产",i);*/
int num = 2;
int i = 0;
for(i==0;i<=24;i++){
if(i%2==0){
printf("%i,%d\n",i,num);
num = num * 2;
}else{
printf("%i,%d\n",i,num);
}
}
printf("%d",num);
}
5678asd
发表于 2020-6-22 12:44:51
2333
BIGBUTTER
发表于 2020-6-22 16:00:00
0:10个
1:10个
2:c
3:a == 10 , b == 10 , c == 4;
4: z = (x > 0 ? x : -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:
while ((scanf("%d", &score))< 0)
{
printf("count = %d\n", count);
count++;
}
研发部的小黄
发表于 2020-6-22 16:06:13
本帖最后由 研发部的小黄 于 2020-6-22 16:11 编辑
0、10个A
1、0个B
2、a/b/c
3、A=14、B=5、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;
help = 2 * sheds;
}
sheds = 2;
help = 2 * sheds;
——C
while((scanf("%d", &score))>=0)
{
count++;
}
printf("count = %d\n", count);
JackZzz
发表于 2020-6-22 21:34:16
{:5_90:}
Miracle宸翰
发表于 2020-6-22 21:51:01
啊这
WDYWSZGQD
发表于 2020-6-22 23:07:41
1
LVX123
发表于 2020-6-23 11:55:17
感谢分享
lemonLo_oL
发表于 2020-6-23 17:19:30
2
mikisayaka
发表于 2020-6-24 13:57:47
1
巴巴鲁
发表于 2020-6-24 15:56:48
打卡
依风入海
发表于 2020-6-25 09:48:27
看看
风吹鸡蛋壳isme
发表于 2020-6-26 10:27:12
鸡蛋壳
我的老天鹅
发表于 2020-6-27 21:37:59
本帖最后由 我的老天鹅 于 2020-6-27 21:41 编辑
#include<stdio.h>
int main()
{
int t, m , m1t, m2t;
m1t = 1;
m2t = 1;
for(m = 3 ; m <=24; m++)
{
t = m2t;
m2t = m1t + m2t;
m1t = t;
}
printf("2年后兔子有%d", m2t);
return 0;
}
祺哥儿
发表于 2020-6-28 00:20:02
第一部分
0.10
1.11
2.a=b=c
3. a= 14,b=5 , c=9
4.z=(x>=0?x:-x)
5.
if (size > 12)
flag = 2;
{
cost = cost * 1.05;
}
bill = cost * flag;
sheds = 2;
if (ibex > 14)
{
sheds = 3;
}
help = 2 * sheds;
while(1)
{
scanf("%d", &score);
if (score < 0)
{
printf("count = %d\n", count);
}
count++;
}
************************************
第二部分
#include<stdio.h>
/*int main()
{
int bao,yu,year;
bao=yu=10000;
while(bao<=yu)
{
bao=bao*1.05;
yu=yu+1000;
year++;
}
printf("%d年后,谢宝来的投资额超过小甲鱼!\n",year);
printf("小甲鱼的投资额%d\n",yu);
printf("谢宝来的投资额是%d\n",bao);
}
*/
/*int main()
{
int money=4000000,year=0;
while(money>0)
{
money=money - 50;
money=money*1.08;
year++;
}
printf("第%d年破产",year);
}
*/
/*int main() /////////此题不会
{
for (int i = 1,a=1,b=1; i < ; i++)
{
}
}
*/
int main()
{
int b=1;
for (int i = 3; i < 25; i++)
{
}
}