Creating hangman game.

Programming
Tutor: None Selected Time limit: 3 Days

hidden

This is how the output should look like. http://prntscr.com/1is9ht
Don't use arrays cuz we haven't learned that

This is my code so far

int count=1;

while (count<=24){

Scanner keyboard = new Scanner(System.in);

int length;

String originalString;

String guess;

String option= "abcdefghijklmnopqrstuvwxyz";

String questionmarks;

System.out.println("Please enter a string");

originalString=keyboard.nextLine();

length=originalString.length();

questionmarks = originalString.replaceAll(".", "?");

System.out.println("Original String: "+originalString);

System.out.println("Guessed String: "+questionmarks);

System.out.println("Characters to choose from: "+option);

System.out.println("Please guess a character");

guess=keyboard.nextLine();

if (originalString.contains(guess)){

count++;

}

else{

option.replace(guess, "_");

count++;

System.out.println(option);

}

}


Aug 1st, 2013

Hangman game.txt 
This file contains the required code 
Hope it helps :)

Aug 2nd, 2013

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
hidden
...
Aug 1st, 2013
...
Aug 1st, 2013
Dec 5th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer