[ create a new paste ] login | about

Link: http://codepad.org/2ji3b66O    [ raw code | output | fork ]

C, pasted on Jul 21:
1
2
3
4
5
6
7
8
9
10
11
#include <time.h>

int main()
{
  srand( time(NULL) );

  char *states[] = { "Null", "Win", "Lose", "Accel" };

  printf( states[ rand() % 4 ] );
  return 0;
}


Output:
1
Accel


Create a new paste based on this one


Comments: