@@ -237,32 +237,30 @@ a / b = 2
237
237
```
238
238
239
239
### Comparison Operators Sample Program
240
- ```
240
+ ``` c
241
241
#include < stdio.h>
242
242
243
243
int main () {
244
244
int a = 10, b = 10, c = 20;
245
245
246
- printf("%d == %d is %d \n", a, b, a == b);
247
- printf("%d == %d is %d \n", a, c, a == c);
248
- printf("%d > %d is %d \n", a, b, a > b);
246
+ printf ("%d == %d is %d\n", a, b, a == b);
247
+ printf("%d == %d is %d\n", a, c, a == c);
248
+ printf("%d > %d is %d\n", a, b, a > b);
249
249
250
250
return 0;
251
251
}
252
252
```
253
- Since these are comparison operators, they are
254
- comparing the left and right side values.
253
+ Since these are comparison operators, they compare the left and right side values.
255
254
256
255
The result is:
257
256
258
257
```
259
- 10 == 10 is 1
260
- 10 == 20 is 0
261
- 10 > 10 is 0
258
+ 10 == 10 is 1
259
+ 10 == 20 is 0
260
+ 10 > 10 is 0
262
261
```
263
262
264
- The result is either 0 or 1 and remember,
265
- 0 is FALSE and 1 is TRUE.
263
+ The result is either 0 or 1. Remember, 0 is FALSE and 1 is TRUE.
266
264
267
265
## Conditionals
268
266
In a comprehensive program, the computer must decide
0 commit comments