Questions tagged [loop-counter]

18 questions
0
votes
2 answers

Problems with reading char input and with a loop counter

Ok so I am having a major issue here, and after spending two days on this, I can not find out why it is not working as I think it should. First problem: I have a function to see if the player wished to play again by inputting a y or n. If they…
Dragon Wolf
  • 61
  • 1
  • 2
  • 11
-1
votes
1 answer

is there a way to put a condition on only the last input into a list in a loop?

In a Python 'while' loop that is collecting user input, is there a way to put a condition on the last loop? The user determines the number of loops but I want to put a condtion on the last input to be greater or equal to 1. I already have a general…
jDog
  • 11
  • 3
-4
votes
1 answer

Loop works/doesn't work, not sure why C++

I am having an issue with the for loop near the end of this code. The loop is for a hangman game, and essentially the loop cycles through the char array with the secret word, and compares the user guess to each element in the char array. If it is…
Dragon Wolf
  • 61
  • 1
  • 2
  • 11
1
2