first run, fair random
This commit is contained in:
		
							parent
							
								
									42ebb85b70
								
							
						
					
					
						commit
						b022744a46
					
				| @ -3,10 +3,13 @@ | |||||||
|  */ |  */ | ||||||
| 
 | 
 | ||||||
| #include  <stdio.h> | #include  <stdio.h> | ||||||
|  | #include  "funcs.h" | ||||||
| 
 | 
 | ||||||
| int main(int argc, char *argv[]) | int main(int argc, char *argv[]) | ||||||
| { | { | ||||||
| fprintf(stderr, "fake values - %s %s\n", __DATE__, __TIME__); | fprintf(stderr, "fake values - %s %s\n", __DATE__, __TIME__); | ||||||
| 
 | 
 | ||||||
|  | printf("%d\n", random1000(0)); | ||||||
|  | 
 | ||||||
| return 0; | return 0; | ||||||
| } | } | ||||||
|  | |||||||
							
								
								
									
										15
									
								
								funcs.c
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								funcs.c
									
									
									
									
									
								
							| @ -0,0 +1,15 @@ | |||||||
|  | /*
 | ||||||
|  |  * funcs.c | ||||||
|  |  */ | ||||||
|  | 
 | ||||||
|  | #include  <stdio.h> | ||||||
|  | #include  <stdlib.h> | ||||||
|  | 
 | ||||||
|  | #include  "funcs.h" | ||||||
|  | 
 | ||||||
|  | int random1000(int foo) | ||||||
|  | { | ||||||
|  | int     value; | ||||||
|  | value = rand() % 1000; | ||||||
|  | return value; | ||||||
|  | } | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user