Files
ZahlenRatenC/main.h
2026-05-27 13:26:37 +02:00

32 lines
477 B
C

#ifndef main_h
#define main_h
#include <stdlib.h>
#include <stdio.h>
int getRandomNumber(int limiter)
{
return rand() % limiter;
}
int askForRepeat()
{
char nochmal;
printf("Willst du nochmal spielen?\n");
scanf("%c", &nochmal);
if (nochmal == 'j')
{
return 1;
}
else if (nochmal == 'n')
{
return 0;
}
else
{
printf("Input konnte nicht gelesen werden\n");
return askForRepeat();
}
}
#endif