Hi, we’re back. Well for this WSQ we need some new libraries and a accumulator in which we will be able to store the number of fails the player did obtain, and that’s all is pretty simple this time. Down below you will find the code. Have a nice week. The Source Code flickr […]
Hi, we’re back. Well for this WSQ we need some new libraries and a accumulator in which we will be able to store the number of fails the player did obtain, and that’s all is pretty simple this time. Down below you will find the code. Have a nice week. The Source Code flickr […]
https://github.com/estebanpinal/WSQ/blob/master/WSQ06
Me tope con pared con este programa tuve que ir a asesorias para poder lograrlo
Randomness abounds. So for this WSQ, I had to check the <ctime> library and why it worked for assigning random numbers, several times. It ended up being quite easy, as with C++ the same thing can be done in different ways (Thank you cplusplus.com!). Here’s the GitHub link to WSQ 6.
This WSQ was really hard because it was completely different of what the others WQS were about. I did knew how to make random numbers so i just looked up on google. after that I read about it in the book, and in some way I managed to make the code run and to work. … Seguir leyendo WSQ6: Random Numbers →
Again is used these Python 3 programming examples. There I found how to use while-loops. Here is my code: import random numCom = random.randrange(1, 101) numUs = int( input( “Give me a number between 1 and 100: “)) attempt = int(1) while numCom != numUs : attempt = attempt + 1 […]
Here is my code, you have to guess a number that is randomly selected by the program. I did it with no help (except for the time/rand thing).
Hope this helps you!
using namespace std;
int main() {
srand(time(0)); //time changes, the number changes
int r=1+(rand() % 100);
int x;
int count = 0;
cout
cout
cin >>x;
count = count+1;
while (x!=r){
if(x
cout
cin >>x;
count = count + 1;
} else {
if (x>r){
cout
cin >>x;
count = count + 1;
}
}
}
cout
return 0;
}
In this WSQ we were asked to make a program that automatically could choose a number between 1 and 100, …
Let’s talk about the WSQ06, maybe the hardest in this partial (actually it is not hard, but you have to search a lot to understand it). Here the image with the program and the compiler running it: Gaze at the program, stare at it as they are no other thing to observe. I am going […]
Let’s talk about the WSQ06, maybe the hardest in this partial (actually it is not hard, but you have to search a lot to understand it). Here the image with the program and the compiler running it: Gaze at the program, stare at it as they are no other thing to observe. I am going […]