mirror of
https://github.com/adtools/clib2.git
synced 2025-12-08 14:59:05 +00:00
- Added the rand() test program.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15099 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
20
test_programs/rand.c
Executable file
20
test_programs/rand.c
Executable file
@ -0,0 +1,20 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int
|
||||
main(int argc,char **argv)
|
||||
{
|
||||
int n = 10,i,x;
|
||||
|
||||
if(argc > 1)
|
||||
n = atoi(argv[1]);
|
||||
|
||||
for(i = 0 ; i < n ; i++)
|
||||
{
|
||||
x = rand();
|
||||
|
||||
printf("0x%08lx %d\n",x,x);
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
Reference in New Issue
Block a user