, . , Y, . y, , , if .
|
, Y. if. , :
if (taxable == 'Y' || taxable == 'y'): taxable Y y, ... , , , . , , . , taxable . (taxable == 'Y' || 'y') .
: (||), (&&) (!). , if ( ) . , . , if , .
( ), . , , ( 5).
: |
4. .
/*iftax.c*/main() { int taxable; float cost, tax; tax = 0.0; printf(": "); scanf("%f", &cost); printf(" Y, , N, : "); taxable = getchar(); if (taxable == 'Y') tax = cost * 0.06; printf("\n %f", cost + tax); } , . , Y, . y, , , if .
, Y. if. , : if (taxable == 'Y' || taxable == 'y'): taxable Y y, ... , , , . , , . , taxable . (taxable == 'Y' || 'y') . : (||), (&&) (!). , if ( ) . , . , if , . ( ), . , , ( 5).
: 2017-03-12; !; : 236 | : : . |