Relationaler Operator in C -Sprache
#include<stdio.h>
int main(){
int a = 20;
int b = 10;
int c;
// == operator
if(a == b){
printf(“a is equal to b\n”);
}else{
printf(“a is not equal to b\n”);
}
// > operator
if(a > b){
printf(“a is greater than b\n”);
}else{
printf(“a is not greater than b\n”);
}
// < operator
if(a < b){
printf(“a is less than b\n”);
}else{
printf(“a is not less than b\n”);
}
// != Opertor
if(a != b){
printf(“a is not equal to b\n”);
}else{
printf(“a is equal to b\n”);
}
// >= orperator
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”);
}
// <= operator
if(a <= b){
printf(“a is less than or equal to b\n”);
}else{
printf(“a is not less than or equal to b\n”);
}
}
Energetic Echidna