playing dice, or guessing a number games program

This is a discussion on playing dice, or guessing a number games program within the C Programming forums, part of the General Programming Boards category; Requirements
, asking the user to choose between the two games,or exit. It is up to you to design this ...

playing dice, or guessing a number games program

Requirements, asking the user to choose between the two games,or exit. It is up to you to design this prompt.Each game must be programmed in its own function, not in main()! main will call the games’functions.At the end of each game, the user is returned to the

The user is asked to pick a number between 2 and 12.

The computer rolls two dice, using random variables, and adds up the score on each die.
Since each die can score from 1 to 6, the total score can be from 2 to 12.

If the roll matches the user’s picked number, the user wins; otherwise, the user loses.

The computer informs the user of the result (win or loss), and this game ends.

[COLOR=rgb(0.000000%, 0.000000%, 100.000000%)]Guess a number:[/COLOR]

The computer randomly selects a number between 0 and 100.

The computer asks the user to guess the number.

The computer informs the user if the user’s guess is too high, too low, or right on. In the latter
case, the user wins and we jump to step 4. Otherwise, we repeat from step 2 and the user will
guess again.

In this step the user has won. The computer tells the user how many tries it took for the user
to guess it right, and this game ends.

I already started something and this is what i have...I'm not asking you to do it, I want to know if I'm on the right track and if I've already made some mistakes, please correct me.
Thanks

1. “Void” is not a C type. You probably want “void”.
2. Neither “prinf” nor “print” are defined anywhere in your program. You probably want “printf”.
3. printf doesn't terminate its output with a newline character ('\n'), so you might consider appending one to the end of your format strings, or alternatively, use puts.
4. Using the value stored in choice has undefined behaviour if scanf returns 0 or EOF, so handle the cases where it returns those values appropriately.