Closed Thread
Results 1 to 2 of 2

Thread: C languege (auto ganerate number)

  1. #1
    dky8810 is offline Newbie
    Join Date
    Nov 2008
    Posts
    9
    Rep Power
    0

    Question C languege (auto ganerate number)

    How to use C languege to auto generate number???
    example:
    1001
    1002
    than 1st number is fit(1002)

    by not using this matter:

    Code:
    int id=101;
    .........
    id++;
    pls help!!!

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    dky8810 is offline Newbie
    Join Date
    Nov 2008
    Posts
    9
    Rep Power
    0

    Re: C languege (auto ganerate number)

    Quote Originally Posted by dky8810 View Post
    How to use C languege to auto generate number???
    example:
    1001
    1002
    than 1st number is fit(1002)

    by not using this matter:

    Code:
    int id=101;
    .........
    id++;
    pls help!!!
    /* RAND.C: This program seeds the random-number generator
    * with the GetTickCount, then displays 10 random integers.
    */

    thx i know ald
    Code:
    #include <stdlib.h>
    #include <stdio.h>
    #include <winbase.h>
    
    void main( void )
    {
       int i;
       /* Seed the random-number generator with GetTickCount so that
          the numbers will be different every time we run.
           */
       srand(
           GetTickCount() 
             );
       /* Display 10 numbers. */
       for(
             i = 0;   i < 10;i++ 
            )
       printf(
             "%6d\n", rand() 
            );
       }

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. GCC and auto-linking?
    By phirephly in forum C and C++
    Replies: 2
    Last Post: 12-30-2010, 09:33 AM
  2. Auto Updater [Help]
    By tmo in forum Visual Basic Programming
    Replies: 1
    Last Post: 12-09-2010, 10:00 PM
  3. I'm looking for a programming languege like this
    By alan in forum General Programming
    Replies: 8
    Last Post: 05-16-2010, 07:30 AM
  4. auto reply on ym
    By cakka in forum Computer Software/OS
    Replies: 4
    Last Post: 01-03-2010, 10:54 PM
  5. Auto Focus
    By Ronin in forum HTML Programming
    Replies: 3
    Last Post: 05-01-2007, 04:52 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts