@@ -263,60 +263,57 @@ The result is:
263263The result is either 0 or 1. Remember, 0 is FALSE and 1 is TRUE.
264264
265265## Conditionals
266- In a comprehensive program, the computer must decide
267- based on the condition/s given. Of course, the computer
268- cannot do that alone, you must instruct it exactly.
269- The most common is the
270- IF statement with the extended IF/ELSE.
266+ In a comprehensive program, the computer must make decisions based on given
267+ conditions. Of course, the computer cannot do this alone; you must instruct it
268+ exactly. The most common conditional statement is the ` IF ` statement, often
269+ extended with ` IF/ELSE ` .
271270
272271### Sample Program Using IF
273- ```
272+ ``` c
274273#include < stdio.h>
275274
276275int main () {
277276 int i = 10;
278277
279- if (i == 10) printf("Expected value is the same as variable i, so the result is TRUE. \n");
278+ if (i == 10) {
279+ printf ("Expected value is the same as variable i, so the result is TRUE.\n");
280+ }
280281
281282 return 0;
282283}
283284```
284285
285- In a single IF statement, the programmer wants to test,
286- expect or verify something, such as this program.
287- The programmer is expecting that ` i ` variable
288- has the value 10, and variable ` i ` has the same
289- value, so the statement
290- ` Expected value is the same as variable i, so the result is TRUE. `
291- will be printed. If the expected value is
292- not the same as the value of the variable,
286+ In a single ` IF ` statement, the programmer wants to test, expect, or verify
287+ something. In this program, the programmer expects that the variable ` i ` has
288+ the value 10. Since variable ` i ` does have the value 10, the statement
289+ ` Expected value is the same as variable i, so the result is TRUE. ` will be
290+ printed. If the expected value is not the same as the value of the variable,
293291the statement will not be printed.
294292
295- Sometimes, just an IF will not be sufficient,
296- particularly when you want to catch the FALSE result
297- or create a nested IF-ELSE. So, you want to extend it
298- and catch the FALSE result.
293+ Sometimes, just an ` IF ` statement is not sufficient, particularly when you want
294+ to handle the FALSE result or create a nested ` IF-ELSE ` . In such cases, you
295+ extend it to catch the FALSE result.
299296
300297### Sample Program Using IF ELSE
301- ```
298+ ``` c
302299#include < stdio.h>
303300
304301int main () {
305302 int i = 10;
306303
307304 if (i == 11) {
308- printf("Expected value is the same as variable i, so the result is TRUE. \n");
305+ printf ("Expected value is the same as variable i, so the result is TRUE.\n");
309306 } else {
310- printf("Expected value is not the same as variable i, so the result is FALSE. \n");
307+ printf("Expected value is not the same as variable i, so the result is FALSE.\n");
311308 }
309+
312310 return 0;
313311}
314312```
315313
316- Not only the statement in the ELSE branch will be printed,
317- you can do a lot of things just like correct an error,
318- go to a certain part of a program, etc. That's the power
319- of catching the FALSE result.
314+ Not only can the statement in the ` ELSE ` branch be printed, but you can also
315+ perform various actions such as correcting an error, navigating to a certain
316+ part of a program, etc. That's the power of catching the FALSE result.
320317
321318## Loops
322319There are commands or portions of your program
0 commit comments