This is a discussion on Frends needed :d within the General Discussions forums, part of the Community Boards category; Originally Posted by GrafixFairy Move on, you are very annoying. Now we are definitely not going to be friends. Your ...
hodOr, HoDor HOdoR, HODor, hoDor HODOr, hoDor, HodoR, hOdoR, hODOr, HoDOr hOdor, hodor, HoDOr HodoR, hoDor, hodor, HOdor HOdoR, HODor, hodOr, hOdoR hodOr hoDOr, hodor, hodOR hODor, hodOr, HoDoR, hoDor HOdoR, HODor, hoDor, hoDOr hodor hOdoR, hodor, hoDoR, hOdoR, hodor, hODor, hoDor. hODOr, HOdoR, HODor, hoDor, HodoR HOdoR, HODor, hodor, HoDOr HOdoR, HODor, hodor, HOdoR hodOr hODoR, hODOr, hoDoR, HOdOr, HOdor hOdoR, hoDoR, hODor, hODor, hoDor, hOdoR, HOdoR HOdoR, HODor, hodor, HOdoR hoDOr, hodor, HodoR, hodOr, hODOr hodOr, hOdoR hOdor, hODOr, HodoR, HodoR, hoDor, hOdor, HOdoR. hODor, HodoR, hodor, HoDor, hodOr, HODoR, HoDor, hodor, hodOr, HodoR, hodOR, hOdor, hodor, HoDOr hodOR, hODOr, hoDoR HodoR, hoDor, hodor, HOdor HOdoR, HODor, hodOr, hOdoR? hodOR, hODOr, hoDoR hoDOr, hoDoR, hOdoR, HOdoR HodoR, hoDor, HODOr, HOdOr, hodOR hODoR, hodOr, HOdoR, HODor hodor hoDOr, hoDor, hOdoR, hOdoR, hodor, hODor, hoDor hoDoR, hOdoR, hodOr, HoDOr, hODor HOdoR, HODor, hoDor hODoR, hODOr, HodoR, HOdor, hOdoR HoDor, hODOr, HodoR, HOdoR, hodOR HOdoR, hODoR, hODOr hodOr, HoDor hodOR, hODOr, hoDoR hOdoR, HOdoR, hodor, HoDOr, HOdor hodor hOdor, HODor, hodor, HoDOr, hOdor, hoDor.
Please reply with the correct passphrase.
Edit:
hODOr, HODor Hodor, hodOR HOdoR, HODor, hoDor hODoR, hodor, hodOR. HOdoR, HODor, hoDor, HodoR, hoDor hodOr, hOdoR HoDOr, hODOr HoDOr, hoDor, hoDor, HOdor HOdoR, hODOr Hodor, hoDor HoDOr, hodor, hOdoR, HOdoR, hodOR! HoDor, HodoR, hodOr, hoDor, HoDOr, HOdor, hOdoR, HODor, hodOr, HODOr hodOr, hOdoR hOdoR, hODOr, hoDOr, hoDor, HOdoR, HODor, hodOr, HoDOr, hODor HOdoR, HODor, hodor, HOdoR hoDOr, hoDoR, hOdoR, HOdoR Hodor, hoDor hoDor, hodor, HodoR, HoDOr, hoDor, HOdor hodOr, hoDOr, hODOr.
Last edited by Hodor; 03-05-2014 at 06:05 AM.
Don't feel i lost anything tho..you had no reason to get all obnoxious like you were.
Im generating 25 random #s between 0 and 99
1)How do i get it to stop repeating a number?
2)can i just use <cstdlib> or do i need <ctime?
You are either reseeding the number generating between every new number with the same seed, or you just got very lucky and were able to generate 25 equal random numbers. The odds of the latter happening are possibly impossible in a pseudo RNG with a good uniform distribution (which is a funny thing to say, the better the uniform distribution, the least likely you are to get a true random distribution of numbers), but to be sure we would have to analyse your RNG uniform distribution method.
If instead you mean, you don't want a random number to appear more than once, you need to collect them into an array (or other data storage type) and check this array against a newly generated number. If they match, you discard the newly generated number and simply generate another number.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Got it dear...Instructor says it can be repeated..thnx Hordor.
this is what i have...now how do i get it to list odds and evens separately?
Code:#include <cstdlib> #include <iostream> #include <ctime> using namespace std; int main() { int num =0; int Even; int Odd; srand(time(0)); for (int x = 1; x < 26; x++) cout << 0+(rand()%100)<<endl; system("PAUSE"); return 0; }
Use the modulo operator. number % 2 will return the remainder of number divided by 2. If this return value is zero, you have an even number.
Code:if (foo % 2) // foo is odd
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
i know ...but, i don't know what i should divide by two, i get an error when i use rand and error for x too.
You are generating the random number and immediately passing it to the screen without first storing it in a variable. First store the generated number in a variable and manipulate that variable as you see fit. Only then output the variable to the screen.
If this isn't enough, start a new thread on the C++ board. This board is for making frien... discussing sausages. Not for solving specific programming issues.
Originally Posted by brewbuck:
Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.
Your instructor is an idiot if they say that in a sequence of random numbers that a number cannot be repeated. Ask them to speak to me if you like.
Also, don't call me "dear" you patronising twat.
Edit: When you know more than me you can address me as "dear". Until then, just be quiet.
Last edited by Hodor; 03-05-2014 at 07:07 AM.
stfu obviously you cannot read properly! it says can you fool!