Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
jdevfullstack authored Jul 28, 2024
1 parent 5899e84 commit ee5f99c
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,32 +237,30 @@ a / b = 2
```

### Comparison Operators Sample Program
```
```c
#include <stdio.h>

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

printf("%d == %d is %d \n", a, b, a == b);
printf("%d == %d is %d \n", a, c, a == c);
printf("%d > %d is %d \n", a, b, a > b);
printf("%d == %d is %d\n", a, b, a == b);
printf("%d == %d is %d\n", a, c, a == c);
printf("%d > %d is %d\n", a, b, a > b);

return 0;
}
```
Since these are comparison operators, they are
comparing the left and right side values.
Since these are comparison operators, they compare the left and right side values.

The result is:

```
10 == 10 is 1
10 == 20 is 0
10 > 10 is 0
10 == 10 is 1
10 == 20 is 0
10 > 10 is 0
```

The result is either 0 or 1 and remember,
0 is FALSE and 1 is TRUE.
The result is either 0 or 1. Remember, 0 is FALSE and 1 is TRUE.

## Conditionals
In a comprehensive program, the computer must decide
Expand Down

0 comments on commit ee5f99c

Please sign in to comment.