标题:各位大神帮我看看吧。。它老是给出这种错误,我不会改
取消只看楼主
凛略
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2014-9-24
结帖率:0
已结贴  问题点数:20 回复次数:0 
各位大神帮我看看吧。。它老是给出这种错误,我不会改
#include<stdio.h>
void main()
{
long int i;
int b1,b2,b3,b4,b5,k;
printf("please input the income:\n");
scanf("%d",&i);
b1=100000*(10%)
b2=b1+100000*(7.5%)
b3=b2+200000*(5%)
b4=b3+200000*(3%)
b5=b4+400000*(1.5%)
if(i<=1000000)
k=i*10%;
else
if(i<=200000)
k=b1+(i-100000)*(7.5%)
else
if(i<=400000)
k=b2+(i-200000)*(5.0%)
else
 if(i<=600000)
k=b3+(i-400000)*(3.0%)
else
if(i<=1000000)
k=b4+(i-600000)*(1.5%)
else
k=b5+(i-10000000)*(1.0%)
printf("the input is %d",k);
}

:--------------------Configuration: 利润计算 - Win32 Debug--------------------
Compiling...
1.cpp
C:\Program Files (x86)\Microsoft Visual Studio\MyProjects\利润计算\1.cpp(8) : error C2059: syntax error : ')'
C:\Program Files (x86)\Microsoft Visual Studio\MyProjects\利润计算\1.cpp(15) : error C2181: illegal else without matching if
C:\Program Files (x86)\Microsoft Visual Studio\MyProjects\利润计算\1.cpp(17) : error C2059: syntax error : ')'
Error executing cl.exe.

1.obj - 3 error(s), 0 warning(s)
搜索更多相关主题的帖子: include please income 
2014-09-26 06:32



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-436582-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 1.202718 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved