WSQ06

In this activity, the program had to choose a random number from 0 to 100, then, the user had to guess what number it is. For this, the program had to state that the number that was input in the program was too high or too low.

I had a lot of problems with this one because I couldn’t create the random number. Later, I discovered that I had to use “srand”, then, I had another problem. I had a wrong order with the loops, I could perfectly go from “Too high” to “Too low”, but when it had to go back again to “Too high” the program ended, so I had to change the order of the loops. I used two “ifs” inside a “while”, so it would never end until the user guess the number.

I think this was the hardest of the activities for me because it involved more variables and terms, but finally I could do it.

CC BY 4.0 WSQ06In this activity, the program had to choose a random number… by lowercase is licensed under a Creative Commons Attribution 4.0 International License.