if : income depents. , if, , income 20 , depents . , , 20001 , puts() .
, , , . , .
if (taxable == 'Y' &&taxable == "y"), . , , , .
, , 40 60 . :
if (cost>= 40000.00 &&cost<= 60000.00)if, , . 40000 60000 , (.3).
, , cost . ,
. 3. ,
, - , . if , , , :
if (income<= 20000.00 || income>= 60000.00) puts(" ");, , , . () , , if, 0. , , , . , : , count , 0:
|
|
if (count == 0)
, : , count , :
int count;count = 1;if (count) puts("");if (count) if (count!= 0), , . , .
if
if...else . , . if. . , if :
if (income > 100000) if (status == 'S') taxrate = 0.35;, , taxrate . :
if (income > 100000 && status == 'S') taxrate = 0.35;, , &&, , if. , : income 100000 status "S", taxrate 0.35.
, if , . , , if, , . :
main() { floatincome; scanf("%f", &income); if (income>= 20000.00) if (income<= 100000.00) puts(" 22%"); else puts(" 20000$ - 15%"); }, -, : income 20000 100000, , income 20000, .
, , , . , 20000, puts(), 100000, 15.
, else if , . , else if, . else if, , income 20000 100000.
|
|
, , :
if (income>= 20000.00) { if (income<= 100000.00) puts(" 22%"); }else puts(" 20 , \ 15%");, else if.
if:
if (income>= 20000.00 &&income<= 100000.00) puts(" 22%");else puts(" 20 , \ 15%");if .
, , . , , , 100 . . , , , income, 150000, . , ?
6. if...else. , , . (income< 20000.00), puts(), . else if, (income< 100000.00) , .