Created
July 5, 2015 14:37
-
-
Save bilalbaraz/879d88a34364d0afcc51 to your computer and use it in GitHub Desktop.
Matematikte Özel Sayılar: Hilbert Sayıları
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <conio.h> | |
#include <locale.h> | |
main(){ | |
setlocale(LC_ALL, "Turkish"); | |
int k, i = 1, sonuc; | |
printf("### HILBERT SAYILARI ###\n\n"); | |
printf("Üst sınır giriniz:"); | |
scanf("%d", &k); | |
if(k <= 0){ | |
printf("Ust Sınır pozitif tam sayı olmalıdır."); | |
}else{ | |
while(i <= k){ | |
sonuc = (i-1)%4; | |
if(sonuc == 0) | |
printf("%d\n", i); | |
i++; | |
} | |
printf("\n# Üst sınıra kadar olan (üst sınır dahil) tüm hilbert sayılarını listeledik."); | |
} | |
getch(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment