June 6th, 2013, 11:10 AM
Simple hangman game
Greetings to everyone!
Firstly, I must apolagize for my English, I'm learning.
What I have to do is the hangman game the simplest way as possible.
This is the code I have at the moment:
using namespace std;
cout<<"Introduce a sentence:"<<endl;
cout<<"Introduce the attempts number"<<endl;
cout<<"You have "<<attempts<<" attempts"<<endl;
cout<<"You have "<<i<<" letters"<<endl;
cout<<"Introduce a letter: ";
But it doesn't work correctly, so my doubt is: how could I do it so that the number of attempts subtracts one number when I fail a letter and the game ends when you run out of attempts?
(I don't know if I've explained well, any question ask me)
Important: I have to complete the exercise just with the structure it appears in the code I've done, only with the library <iostream>.
┐Could you help me? Thank you so much!
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!