How would you write that in code.. if you could show it to me

How would you write that in code.. if you could show it to me

i have everything else i just neeed the code for the player only gets 10 guesses then after ten guesses, says "Would you like to play again"

Guessing game? Well, ok... what kind of guessing game?
And if you really have code, post it, please.
And use code tags!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.