วันอาทิตย์ที่ 7 กันยายน พ.ศ. 2557
income tax
void setup(){
size(200,100);
background(255);
float income = 500000 ;
if (income >= 800000){ //income is greater than or equal to 800000
println("pay for tax "+income*25/100);
}else if((income < 800000)&&(income >= 500000)){ //income is less than 800000 and greater than or equal to 500000
println("pay for tax "+income*20/100);
}else if((income < 500000)&&(income >= 300000)){ //income is less than 500000 and greater than or equal to 300000
println("pay for tax "+income*15/100);
}else if((income < 300000)&&(income >= 150000)){ //income is less than 300000 and greater than or equal to 150000
println("pay for tax "+income*10/100);
}else if (income < 150000){ //income is less than 150000
println("pay for tax "+"0");
}
}
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
ไม่มีความคิดเห็น:
แสดงความคิดเห็น