0% found this document useful (0 votes)
24 views1 page

Increment Operator

The document is a C program that demonstrates the use of various relational operators to compare two integers, a and b. It checks for equality, inequality, greater than, less than, greater than or equal to, and less than or equal to, printing the results of each comparison. The program ultimately shows that a (10) is not equal to, not greater than, and less than b (20).

Uploaded by

mangriomubashir6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views1 page

Increment Operator

The document is a C program that demonstrates the use of various relational operators to compare two integers, a and b. It checks for equality, inequality, greater than, less than, greater than or equal to, and less than or equal to, printing the results of each comparison. The program ultimately shows that a (10) is not equal to, not greater than, and less than b (20).

Uploaded by

mangriomubashir6
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

#include <stdio.

h>

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

// Equal to
if (a == b) {
printf("a is equal to b\n");
} else {
printf("a is not equal to b\n"); // Output: a is not equal to b
}

// Not equal to
if (a != b) {
printf("a is not equal to b\n"); // Output: a is not equal to b
}

// Greater than
if (a > b) {
printf("a is greater than b\n");
} else {
printf("a is not greater than b\n"); // Output: a is not greater than b
}

// Less than
if (a < b) {
printf("a is less than b\n"); // Output: a is less than b
}

// Greater than or equal to


if (a >= b) {
printf("a is greater than or equal to b\n");
} else {
printf("a is not greater than or equal to b\n"); // Output: a is not
greater than or equal to b
}

// Less than or equal to


if (a <= b) {
printf("a is less than or equal to b\n"); // Output: a is less than or
equal to b
}

return 0;
}

You might also like