|
-
November 8th, 2002, 02:39 AM
#1
how to produce a 6 bit random integer
how to produce a 6 bit random integer. i means how to control the bits
e.g.
213432,
312356,
,,,,,
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
main()
{
int i;
srand( (unsigned)time( NULL ) );
/* Display 10 numbers. */
for( i = 0; i < 10;i++ )
printf( " %6d\n", rand() );
printf("new line \n");
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|