For this WSQ we had to write a program that picks a random integer in the range of 1 to 100. It then prompts the user for a guess of the value, with hints of ’too high’ or ’too low’ from the program. The program continues to run until the user guesses the integer.
————————————————————————–
At first I had an idea but it didn’t go so well,
so I decided to search in my classmates blogs and I found that the majority wrote “rand” and I didn’t know what was that so I looked up for a video in youtube and it helped me a lot.
C++ Console Lesson 22: Using the rand() Function by xoaxdotnet.
this is the link to the video—> https://www.youtube.com/watch?v=PZZUJ1fxG04
————————————————————————-
Then I wrote my code that looks like this
and ran in the terminal
( I DID NOT CHEAT, I ONLY DID TWO ATTEMPTS 🎉)
The link to my “PickANumber” code—> https://github.com/mfcanov/PickANumber.git
Give me your number 😏 by fernandacano is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.