Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- void exit( int exit_code );
- void turtles() {
- int turtles = 10;
- printf("\n 10 zombie turtles are flying through the air. \n");
- while (turtles > 2) {
- turtles--;
- printf("\n %i zombie turtles are flying through the air. Alex came and 1 turtle flew away :-(", turtles);
- }
- turtles--;
- printf("\n %i zombie turtle is flying through the air. Alex came and the turtle flew away :-(", turtles);
- printf("\n \n NO MORE ZOMBIES! \n");
- exit(0);
- }
- void counter() {
- int zahl = 0;
- printf("\n");
- while (zahl < 100) {
- zahl++;
- printf("\n %i \n", zahl);
- }
- exit(0);
- }
- int main() {
- int input;
- printf("Choose a boring function, please!\n");
- printf("1 : Zombie Turtles \n");
- printf("2 : useless counter \n");
- printf("3 : NOT IMPLEMENTED YET! \n");
- printf("4 : EXIT! \n");
- scanf("%i", &input);
- switch (input) {
- case 1:
- turtles();
- case 2:
- counter();
- case 3:
- printf("\nLOL!!!!!!\n\n");
- exit(0);
- case 4:
- exit(0);
- default:
- printf("\nINVAILD! Stop that BASTARD! \n");
- exit(0);
- }
- printf("You'll never see this message!");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement