int eing;
int eingabe;
int zufallszahl;
getch("%c",&eingabe)=eing;
if (eing=='l')
{
srand(time(0));
zufallszahl = 1+(rand() % (10-1));
printf("Die Zufallszahl ist diesmal %d\n\n",zufallszahl);
}
else if (eing=='m')
{
srand(time(0));
zufallszahl = 1+(rand() % (25-1));
printf("Die Zufallszahl ist diesmal %d\n\n",zufallszahl);
}
else if (eing=='s')
{
srand(time(0));
zufallszahl = 1+(rand() % (50-1));
printf("Die Zufallszahl ist diesmal %d\n\n",zufallszahl);
}
Lesezeichen