Skip to content

Instantly share code, notes, and snippets.

@batuhanozkose
Created January 11, 2022 15:56
Show Gist options
  • Select an option

  • Save batuhanozkose/c83bf8d4b3cf438368088dcdfefda1ae to your computer and use it in GitHub Desktop.

Select an option

Save batuhanozkose/c83bf8d4b3cf438368088dcdfefda1ae to your computer and use it in GitHub Desktop.
Çok basic bir şekilde C dilinde karşılaştırma operatörleri.
#include <stdio.h>
#include <locale.h>
int main() {
setlocale(LC_ALL, "Turkish");
//Karşılaştırma operatörü
int a = 10;
int b = 20;
int c = 30;
if (a == b) {
printf("a == b\n");
}
if (a != b) {
printf("a != b\n");
}
if (a > b) {
printf("a > b\n");
}
if (a < b) {
printf("a < b\n");
}
if (a >= b) {
printf("a >= b\n");
}
if (a <= b) {
printf("a <= b\n");
}
if (a == c) {
printf("a == c\n");
}
if (a != c) {
printf("a != c\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment