Skip to content

Commit ee5f99c

Browse files
Update README.md
1 parent 5899e84 commit ee5f99c

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -237,32 +237,30 @@ a / b = 2
237237
```
238238

239239
### Comparison Operators Sample Program
240-
```
240+
```c
241241
#include <stdio.h>
242242

243243
int main() {
244244
int a = 10, b = 10, c = 20;
245245

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);
249249

250250
return 0;
251251
}
252252
```
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.
255254

256255
The result is:
257256

258257
```
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
262261
```
263262

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.
266264

267265
## Conditionals
268266
In a comprehensive program, the computer must decide

0 commit comments

Comments
 (0)