repl.it
@FuyuWinter/

C - Nathan Escape Room

C

No description

fork
loading
Files
  • main.c
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#include <stdio.h>

int main() {
  int i;
  printf("                Crack The Code\n");
  printf("              By Nathan Hargreaves\n");
  scanf("%c");
  for (i = 0; i < 50; i++) {
    printf("\n");
  }
  printf("                Angletraz\n");
  printf("You have been relocated to Angletraz Prison, and you are planning your escape. Coming in, you notice all the door locks have different, mathematical puzzles on them. The only way you are going to get out is if you can crack the codes and crack them quickly. Are you ready to begin? Then let’s go!\n");
  scanf("%c");
  for (i = 0; i < 50; i++) {
    printf("\n");
  }
  printf("                Night Time Escape\n");
  printf("It’s night, and all the other inmates are asleep. The perfect time to risk an escape. And even better, the guard forgot to lock your cell door! You silently open your door, and thankfully there are no guards watching you. You don’t attempt to close the door, fearing that it might make a noise, and you run to the end of the hallway.\n");
  printf("Suddenly, a guard comes out of the door on your right! He must know that this is the only way out, as he immediately shuts the door and locks it from the other side. However, if you can crack the door’s secret code, you should be able to escape without him alerting the rest of the prison that you’ve escaped.\n");
  scanf("%c");
  for (i = 0; i < 50; i++) {
    printf("\n");
  }
  printf("                The Code\n");
  printf("The door has ten buttons, each of them with a different number on them, ranging from 0 to 9. There is a warning sign though: Press one wrong button and it sends off an alarm. There is also a timer next to the sign, and it’s counting down! You have approximately 20 seconds to figure out the code, but you then hear the guard’s voice from the other side of the door. He says;\n");
  printf("You can try all you like, but nothing will open the door!\n");
  printf("You notice he dropped a piece of paper on the floor! It reads “5,3,7,6,6,0,6” Maybe that’s a clue to open the door? Whatever it is, you need to open it quickly! Puzzle No. 1 starts…now!\n");
  scanf("%c");
  for (i = 0; i < 50; i++) {
    printf("\n");
  }
  printf("Press enter for the timer to start\n");
  scanf("%c");
  for (i = 0; i < 50; i++) {
    printf("\n");
  }
  char answer[512];
  
  printf("0  1  2  3  4\n");
  printf("5  6  7  8  9\n");
  scanf("%c", answer);
  if (answer == "") {
    for (i = 0; i < 50; i++) {
      printf("\n");
    }
    printf("                Congratulations!\n");
    printf("You solved the puzzle! The trick was, when the guard said nothing will open the door, he was telling the truth. You didn’t have to press any buttons, just wait for the timer to finish counting down and unlock the door. Now go! You wouldn’t want any more guards on your tail!\n");
    scanf("%c");
    for (i = 0; i < 50; i++) {
      printf("\n");
    }
    printf("                33333\n");
    printf("The next door has a different lock, this time there are 10 different tiles that need to be placed in the correct positon to solve the equations. 0 is already in place for you, so you need to organise the remaining tiles to correct the problem.\n");
    scanf("%c");
    for (i = 0; i < 50; i++) {
      printf("\n");
    }
    char f[512];
    char s[512];
    printf("First Number: ");
    scanf("%c", f);
    printf("Second Number: ");
    scanf("%c", s);
  }
  
  return 0;
}
Fetching token
?