fork(2) download
  1.  
  2. unsigned long distribution[128] = { 0 } ;
  3.  
  4. int main( void )
  5. {
  6. srand( time( 0 ) ) ;
  7.  
  8. unsigned long total = 10000000 ;
  9. for( unsigned long count = 0 ; count < total ; count++ )
  10. {
  11. int r=rand()%62 ;
  12. r+=r>9?r>35?61:55:48 ;
  13. distribution[r]++ ;
  14. }
  15.  
  16. for( int index = 0 ; index < 128 ; index++ )
  17. {
  18. printf( "%d %c %lu\n" , index , index , distribution[index] ) ;
  19. }
  20. }
  21.  
  22.  
  23.  
Success #stdin #stdout 0.13s 9416KB
stdin
Standard input is empty
stdout
0  0
1  0
2  0
3  0
4  0
5  0
6  0
7  0
8  0
9 	 0
10 
 0
11  0
12  0
13 
 0
14  0
15  0
16  0
17  0
18  0
19  0
20  0
21  0
22  0
23  0
24  0
25  0
26  0
27  0
28  0
29  0
30  0
31  0
32   0
33 ! 0
34 " 0
35 # 0
36 $ 0
37 % 0
38 & 0
39 ' 0
40 ( 0
41 ) 0
42 * 0
43 + 0
44 , 0
45 - 0
46 . 0
47 / 0
48 0 160809
49 1 162128
50 2 162228
51 3 161232
52 4 161145
53 5 161153
54 6 161960
55 7 161664
56 8 161054
57 9 160861
58 : 0
59 ; 0
60 < 0
61 = 0
62 > 0
63 ? 0
64 @ 0
65 A 161330
66 B 162040
67 C 161235
68 D 162121
69 E 160998
70 F 161433
71 G 161123
72 H 161344
73 I 161313
74 J 161046
75 K 160864
76 L 161070
77 M 161249
78 N 161276
79 O 161140
80 P 160961
81 Q 161250
82 R 162014
83 S 161422
84 T 161055
85 U 161901
86 V 161235
87 W 160434
88 X 161619
89 Y 161085
90 Z 161470
91 [ 0
92 \ 0
93 ] 0
94 ^ 0
95 _ 0
96 ` 0
97 a 161389
98 b 161618
99 c 161304
100 d 161117
101 e 161327
102 f 161293
103 g 160649
104 h 160942
105 i 161095
106 j 160890
107 k 161960
108 l 161378
109 m 161840
110 n 161022
111 o 161085
112 p 161026
113 q 161426
114 r 161036
115 s 161311
116 t 160372
117 u 160734
118 v 161323
119 w 161483
120 x 161413
121 y 161393
122 z 161312
123 { 0
124 | 0
125 } 0
126 ~ 0
127  0