用pascal语言写个关于如下问题的语句

来源:百度知道 编辑:UC知道 时间:2024/05/22 20:31:19
个人所得税计算方法设为:应发数少于800元为0;800~1000元的部分为5%;1000~5000元的部分为10%;5000元以上的部分为20%。
如何用IF语句写啊 不太会。 请各位大侠帮帮忙

你知道么?这样很烦哦
program grsl;
var
x:integer;
begin
readln(x);{我都四舍五入到分}
if x<800 then write('0');
if (x>=800)and(x<1000) then write((x*0.05):0:2);
if (x>=1000)and(x<5000) then write((10+(x-1000)*0.1):0:2);
if (x>=5000) then write((410+(x-5000)*0.2):0:2);
readln;
readln;
end.

设工资为i,
if i<800 then writeln(i);
if 800<=i<1000 then writeln(i-(i-800)*0.05);
写两句,你套把