Dyskusje Q&A
Quiz with loop from 0 to 100
0 głosów
8 odpowiedziIn the short code below, I declared an array of five elements. But I'm getting confused on how to use it in a while loop. My main question is , if the user inputs a userchoice1 value that is less than 1, I want the code to keep looping until the user inputs a number that is not less than 1. But I don't know if the 7th line (userchoice1 [x]++) shows the right way to loop it.
1 Głos
2 odpowiedziusing a while loop create a guessing game program that keeps asking the user to enter a number until the user enters the number 7. You will need to create and initialise an int variable to zero. You can then use this variable as the condition in your while loop ( while the number is not equal to seven) Then in the while loop ask the user to enter a number and store the number entered in the number variable that is in the conditions of your loop.
0 głosów
1 OdpowiedźPopularne dzisiaj
Help please?
4 Votes
Ejercicio Pytho
0 Votes
What is that z for
0 Votes
Suggestions needed
4 Votes
Ruby programming?
3 Votes