仰泳的鱼


私信TA

用户名:DRSnowy

访问量:13206

签 名:

喜欢就去写写写代码!

等  级
排  名 2401
经  验 2230
参赛次数 0
文章发表 3
年  龄 22
在职情况 学生
学  校
专  业

  自我简介:

 

0.0分

25 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区

楼主这个不行吧,就比如,如果大于1000000,则前面都不会执行,只算了个大于1000000部分的奖金,其他全部没算
2021-05-07 15:53:45
可以用开关语句吗
2021-04-27 22:47:49
巧妙啊
2021-03-24 17:19:20
# include<stdio.h>
 
int main()
{
   int l;
   int saray;
   scanf("%d",&l);
   if(l<=100000)
   {
	saray=l*0.1;
   }else if(l>100000&&l<=200000)
   {
	saray=100000*0.1+(l-100000)*0.075;
   }else if(l>200000&&l<=400000)
   {
	saray=100000*0.1+100000*0.075+(l-200000)*0.05;
   }else if(l>400000&&l<=600000)
	{
		saray=100000*0.1+100000*0.075+200000*0.05+(l-400000)*0.03;
	}
	else if(l>600000&&l<=1000000)
	{
		saray=100000*0.1+100000*0.075+200000*0.05+200000*0.03+(l-600000)*0.015;
	}
	else if(l>1000000)
	{
		saray=100000*0.1+100000*0.075+200000*0.05*200000*0.03+400000*0.015+(l-1000000)*0.01;
	}
2021-03-17 20:26:24
int main()
{
	long int i,j;
	scanf("%ld",i);
	if(i<=100000)
	{
		j=i*0.1;
	}
	else if(i>100000&&i<=200000)
	{
		j=100000*0.1+(i-100000)*0.075;
	}
	else if(i>200000&&i<=400000)
	{
		j=100000*0.1+100000*0.075+(i-200000)*0.05;
	}
	else if(i>400000&&i<=600000)
	{
		j=100000*0.1+100000*0.075+200000*0.05+(i-400000)*0.03;
	}
	else if(i>600000&&i<=1000000)
	{
		j=100000*0.1+100000*0.075+200000*0.05+200000*0.03+(i-600000)*0.015;
	}
	else if(i>1000000)
	{
		j=100000*0.1+100000*0.075+200000*0.05*200000*0.03+400000*0.015+(i-1000000)*0.01;
	}
	else
	{
		printf("?????");
	}
	printf("%ld",j);运行错误,大佬求解
2021-01-29 08:35:48
#include <stdio.h>
void main ()
{
	long profit,bonus=0;
	scanf("%d",&profit);
	if (profit<=100000)
		bonus=0.1*profit;
	else if(profit<=200000)
		bonus=10000+(profit-100000)*0.075;
	else if(profit<=400000)
		bonus=17500+(profit-200000)*0.05;
	else if(profit<=600000)
		bonus=27500+(profit-400000)*0.03;
	else if(profit<=1000000)
		bonus=33500+(profit-600000)*0.015;
	else 
		bonus=39500+(profit-1000000)*0.001;
	printf("%d",bonus);
}
2021-01-28 18:15:21
14行应该是求余符号吧...
2020-12-20 16:27:58
  • «
  • 1
  • »