#include <stdlib.h>
#include <stdio.h>
int main()
{
int rastgeleSayi;
srand(time(NULL));
int dogrulama[6] = {11, 38, 23, 14, 33, 12};
int loto[49] = {0};
int sayac = 0;
printf("Sayiler uretiliyor...\n");
for (int i = 0; i < 6; i++)
{
rastgeleSayi = 1 + rand() % 49;
while (loto[rastgeleSayi - 1] == 1)
{
rastgeleSayi = 1 + rand() % 49;
}
loto[rastgeleSayi - 1] = 1;
printf("%d ", rastgeleSayi);
for (int j = 0; j < 6; j++){
if(dogrulama[j] == rastgeleSayi)
sayac++;
}
}
printf("\n%d bildiniz\n", sayac);
if(sayac == 6){
printf("\nKazandınız.\n");
}
printf("\nSayisal Loto tamamlandi.\n");
system("pause");
return 0;
}