#include
#include
#include
#inlcude // I hope you have Turbo C
int room(void)
{
char input;
printf(“You entered the room, which is well lit. Would you like to proceed? (y/n)n”);
input = getch();
if ((input == ‘n’)||(input==’N’)) return 0;
printf(“The lights turned off. Would you like to turn on the flash light?(y/n)n”);
input = getch();
if ((input == ‘n’)||(input==’N’)) return 0;
printf(“You see a monster, would you like to switch to the gun and shoot it? (y/n)n”);
input = getch();
if ((input == ‘n’)||(input==’N’)) return 0;
printf(“You have killed the monster, and are moving on to the next room.n”);
return 1;
}
int locker(void)
{
int lockercombo = rand()%1000;
printf(“You’ve found a PDA, would you like to listen to the messages? (y/n)”);
input = getch();
if ((input == ‘n’)||(input==’N’)) return 0;
printf(“Playing back message … “);
sleep(120000);
printf(“The combo for the locker is %d, would you like to open the locker? (y/n)n”, lockercombo);
input = getch();
if ((input == ‘n’)||(input==’N’)) return 0;
printf(“You found some ammo and a medpack.n”);
return 1;
}
void main(void)
{
srand(time(NULL));
int stillrunning;
do {
if (rand()%10