Skip to content

Commit

Permalink
hhhh
Browse files Browse the repository at this point in the history
  • Loading branch information
danhnahh committed Mar 15, 2024
1 parent 6c603b0 commit f4cddd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions AdvProg_L3-HangMan/hangman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ bool isCharInWord(const char ch, const string& word)
string chooseWordFromList(const vector<string>& wordList, int index)
{
// TODO: Return a lowercase word in the index position of the vector wordList.
string answer;
string answer = wordList[index] ;
int k = answer.size();
for(int i=0; i<k ;i++){
if(answer[i] >=65 && answer[i] <= 90 ) answer[i] += 32;
if(answer[i] >= 'A' && answer[i] <= 'Z' ) answer[i] += 32;
}
return answer;
}
Expand Down

0 comments on commit f4cddd0

Please sign in to comment.