But please remember that when
you use the <= or >= operators, there is no space between them.
Even though an
if statement
usually spans more than one line, it is really one long statement. For
example, the following if statements are identical except for the style in which they are written:
if (salary > 100000)
printf(“\n It is a good salary”);
if (salary > 1000000) printf(“\n It is a good salary”);
Also note that in both of these examples, the compiler considers the if statement and the
conditionally executed statement as one unit, with a semicolon properly placed at the end.
Indentions and spacing are for human readers of a program, not the compiler.
Do'stlaringiz bilan baham: |