You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
835 B

#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include "wwm.h"
int runde = 0;
int geld = 0;
int aktuellGeld = 0;
void wwm(){
printf("Welcome to ´Who wants to be a millionaire?´ \n");
printf("You are at stage %d and have %d $\n", runde, geld);
const char* question[] = {
"Which planet is known as the `blue planet`?",
"What is the capital of Germany?",
"What is the largest desert in the world?"
};
const char* answers[][4] = {
{"Mars", "Venus", "Earth", "Jupiter"},
{"Munich", "Berlin", "Cologne", "Frankfurt am Main"},
{"Antarctica", "Sahara", "Gobi", "Arctica" }
};
int correctAnswer[] = {
3, 2, 1
};
srand(time(0));
int frage = rand() % 5;
printf("Question %d: %s\n", runde + 1, question[frage]);
for (int i = 0; i < 4; i++) {
printf("%d. %s \n", i + 1, answers[frage][i]);
return;
}