You need to terminate the output with a newline to flush the output buffer
printf("Your bet is number %d\n", &bet);
// ^^ newline to flush output buffer
Also, you really don't need an array of 3 ints for input. A single int
is enough
int bet;
scanf("%d", &bet);
// ...
printf("Your bet is number %d\n", bet);
If you want to keep the arrays of 3 ints, you need to change your code
int bet[3];
int result;
scanf( "%d" , &bet[1]); // or &bet[0] or bet + 2
if (bet[1] >=0 && bet[1] <= 36); result = 1;
printf("Your bet is number %d", bet[1]);
Also (I noticed while editing the code above) you have an extra semicolon in your if
line
if (bet >=0 && bet <= 36); result = 1;
// ^ ???
The result = 1;
is not part of the if
.