Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int roullette()
- {
- srandom(time(NULL));
- int bullet = random() % 13;
- int spin = random() % 13;
- printf("Bullet: %d\n", bullet);
- printf("Spin: %d\n", spin);
- if ( bullet == spin )
- {
- return 1;
- } else {
- return 0;
- }
- }
- int main()
- {
- if ( roullette() == 1)
- {
- printf("BAM, you're dead!\n");
- } else {
- printf("You survived!\n");
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment