为什么这个程序没有输出值???
程序代码:
#include<stdio.h> void main() { long int i; int bonus1, bonus2, bonus4, bonus6, bonus10 ,bonus; printf("请输入利润额:"); scanf("%ld\n",&i); bonus1 = 100000 * 0.1; bonus2 = 100000 * 0.75 + bonus1; bonus4 = 200000 * 0.5 + bonus2; bonus6 = 200000 * 0.3 + bonus4; bonus10 = 400000 * 0.15 + bonus6; if(i <= 100000) bonus = i * 0.1; else if(i <= 200000) bonus = (i-100000) * 0.075 + bonus1; else if(i <= 400000) bonus = (i-200000) * 0.05 + bonus2; else if(i <= 600000) bonus = (i-400000) * 0.03 + bonus4; else if(i <= 1000000) bonus = (i-600000) * 0.015 + bonus6; else bonus = (i-1000000) *0.01 +bonus10; printf("您所应得的提成= %ld\n",bonus); }