Skip to content

Instantly share code, notes, and snippets.

@bilalbaraz
Created July 5, 2015 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bilalbaraz/879d88a34364d0afcc51 to your computer and use it in GitHub Desktop.
Save bilalbaraz/879d88a34364d0afcc51 to your computer and use it in GitHub Desktop.
Matematikte Özel Sayılar: Hilbert Sayıları
#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