randamize

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jijo k abraham
    New Member
    • Jul 2010
    • 4

    randamize

    #include<iostre am.h>
    #include<stdlib .h>
    #include<conio. h>
    voidmain()
    {
    randamize();
    int num,rndnum;
    cin>>num;
    rndnum=random(n um)+9;
    for9int N=1;N=rndnum-1;N++)
    cout<<N<<"";
    }
  • Dheeraj Joshi
    Recognized Expert Top Contributor
    • Jul 2009
    • 1129

    #2
    And what is the question?

    Regards
    Dheeraj Joshi

    Comment

    • jijo k abraham
      New Member
      • Jul 2010
      • 4

      #3
      in the objective

      1234
      12
      123456789
      123

      please which is the correct one???

      Comment

      • jijo k abraham
        New Member
        • Jul 2010
        • 4

        #4
        #include<stdlib .h>
        #include<iostre am.h>
        #include<conio. h>
        intmain()
        {
        int n,guessnum;
        randomize();
        cin>>n;
        guessnum=random (n-10)+10;
        cout<<guessnum< <endl:
        }



        this is also anothe questio

        if we give inputs 1,2,3, or 4
        what will be the answer?

        Comment

        Working...