Thread: Frends needed :d

  1. #16
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by GrafixFairy View Post
    Move on, you are very annoying.
    Now we are definitely not going to be friends. Your loss.
    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.

  2. #17
    misoturbutc Hodor's Avatar
    Join Date
    Nov 2013
    Posts
    1,791
    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.

  3. #18
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Hodor View Post
    Please reply with the correct passphrase.
    True friends stab you in the front.
    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.

  4. #19
    Registered User GrafixFairy's Avatar
    Join Date
    Mar 2014
    Posts
    45
    Don't feel i lost anything tho..you had no reason to get all obnoxious like you were.

  5. #20
    Registered User GrafixFairy's Avatar
    Join Date
    Mar 2014
    Posts
    45
    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?

  6. #21
    misoturbutc Hodor's Avatar
    Join Date
    Nov 2013
    Posts
    1,791
    Quote Originally Posted by GrafixFairy View Post
    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?
    Well, pseudo random number generators (PRNGs) are not supposed to avoid repeating numbers. If the sequence doesn't include repeating numbers is it truly random? If you want to discuss this properly I suggest starting a new topic.

  7. #22
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by GrafixFairy View Post
    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.

  8. #23
    Registered User GrafixFairy's Avatar
    Join Date
    Mar 2014
    Posts
    45
    Got it dear...Instructor says it can be repeated..thnx Hordor.

  9. #24
    Registered User GrafixFairy's Avatar
    Join Date
    Mar 2014
    Posts
    45
    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;
    }

  10. #25
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    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.

  11. #26
    Registered User GrafixFairy's Avatar
    Join Date
    Mar 2014
    Posts
    45
    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.

  12. #27
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    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.

  13. #28
    Registered User GrafixFairy's Avatar
    Join Date
    Mar 2014
    Posts
    45
    i posted and i will try your suggestion, thanx

  14. #29
    misoturbutc Hodor's Avatar
    Join Date
    Nov 2013
    Posts
    1,791
    Quote Originally Posted by GrafixFairy View Post
    Got it dear...Instructor says it can be repeated..thnx Hordor.
    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.

  15. #30
    Registered User GrafixFairy's Avatar
    Join Date
    Mar 2014
    Posts
    45
    stfu obviously you cannot read properly! it says can you fool!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. EOF Help NEEDED!
    By clmoore3 in forum C Programming
    Replies: 4
    Last Post: 02-11-2013, 04:57 AM
  2. help needed
    By jack_carver in forum C Programming
    Replies: 3
    Last Post: 03-19-2009, 11:15 PM
  3. Tic-Tac-Toe help needed
    By Newbie2003 in forum C++ Programming
    Replies: 6
    Last Post: 06-09-2003, 01:38 AM
  4. Help Needed
    By Unregistered in forum C Programming
    Replies: 6
    Last Post: 06-14-2002, 01:38 PM
  5. Help Needed Please!!!!!
    By jon_morrow in forum C++ Programming
    Replies: 7
    Last Post: 03-22-2002, 11:55 AM

Tags for this Thread