189 8069 5689

c语言函数求利润 c语言利润奖金提成switch

C语言编程,利润提成

#include stdio.h

成都创新互联是一家集网站建设,洛南企业网站建设,洛南品牌网站建设,网站定制,洛南网站建设报价,网络营销,网络优化,洛南网站推广为一体的创新建站企业,帮助传统企业提升企业形象加强企业竞争力。可充分满足这一群体相比中小企业更为丰富、高端、多元的互联网需求。同时我们时刻保持专业、时尚、前沿,时刻以成就客户成长自我,坚持不断学习、思考、沉淀、净化自己,让我们为更多的企业打造出实用型网站。

#include stdlib.h

void main(void)

{

double money,bouns;

printf("input the money, input a negitive number to leave:");

do{

scanf("%lf",money);

if(money=100000) bouns=money*0.1;

else if(money=200000) bouns=(money-100000)*0.075+100000*0.1;

else if(money=400000) bouns=(money-200000)*0.05+100000*0.075+100000*0.1;

else if(money=600000) bouns=(money-400000)*0.03+200000*0.05+100000*0.075+100000*0.1;

else if(money=1000000) bouns=(money-600000)*0.015+200000*0.03+200000*0.05+100000*0.075+100000*0.1;

else if(money100000) bouns=(money-1000000)*0.01+400000*0.015+200000*0.03+200000*0.05+100000*0.075+100000*0.1;

printf("bouns is %.2lf\n",bouns);

}

while(money=0);

}

#include stdio.h

#include stdlib.h

void main(void)

{

double money,bouns;

int temp;

printf("input the money, input a negitive number to leave:");

do{

scanf("%lf",money);

temp=money/100000;

switch(temp)

{

case 0: bouns=money*0.1; break;

case 1: bouns=(money-100000)*0.075+100000*0.1; break;

case 2:

case 3: bouns=(money-200000)*0.05+100000*0.075+100000*0.1; break;

case 4:

case 5: bouns=(money-400000)*0.03+200000*0.05+100000*0.075+100000*0.1; break;

case 6:

case 7:

case 8:

case 9: bouns=(money-600000)*0.015+200000*0.03+200000*0.05+100000*0.075+100000*0.1; break;

default: bouns=(money-1000000)*0.01+400000*0.015+200000*0.03+200000*0.05+100000*0.075+100000*0.1;

}

C语言求银行本息和利润和

#includestdio.h

void main(){

double num,rate=0.00417,sum=0;

int i;

scanf("%lf",num);

while(num=0){

printf("输入的存款金额必须大于0!\n");

scanf("%lf",num);

}

for(i=1;i=5;i++){

sum=((100+sum)*(1+rate));

}

printf("%.3f\n",sum);

}

C语言编程题 利润提成

#include stdio.h

int main()

{

int z,i;

float sum=0;

printf("input money:");

scanf("%d",i);

if(i=100000)

z=1;

else if(i=200000i100000)

z=2;

else if(i=400000i200000)

z=4;

else if(i=600000i400000)

z=6;

else if(i=1000000i600000)

z=10;

else if(i1000000)

z=11;

switch(z)

{

case 11:sum+=(i-1000000)*0.01;i=1000000;

case 10:sum+=(i-600000)*0.015;i=600000;

case 6:sum+=(i-400000)*0.03;i=400000;

case 4:sum+=(i-200000)*0.05;i=200000;

case 2:sum+=(i-100000)*0.075;i=100000;

case 1:sum+=i*0.1;break;

}

printf("Bonus=%lf",sum);

return 0;

}

调好了 试试


新闻标题:c语言函数求利润 c语言利润奖金提成switch
URL网址:http://jkwzsj.com/article/ddsepes.html

其他资讯