lotto.c
changeset 27 81a574d60c15
parent 9 c3fecc82ade6
child 29 7abf6146898e
equal deleted inserted replaced
26:d227047a3e88 27:81a574d60c15
    39  */
    39  */
    40 
    40 
    41 LONG *lottery (LONG end, LONG num)
    41 LONG *lottery (LONG end, LONG num)
    42 {
    42 {
    43     int i, j;
    43     int i, j;
       
    44 
    44     LONG *z;
    45     LONG *z;
       
    46 
    45     int unique;
    47     int unique;
    46 
    48 
    47     if ((z = (LONG *) calloc (num + 1, sizeof (int))) == NULL)
    49     if ((z = (LONG *) calloc (num + 1, sizeof (int))) == NULL)
    48         exit (0);
    50         exit (0);
    49 
    51 
    70  */
    72  */
    71 
    73 
    72 LONG *evaluation (LONG * numbers, int num, int verbose)
    74 LONG *evaluation (LONG * numbers, int num, int verbose)
    73 {
    75 {
    74     int i, j, k;
    76     int i, j, k;
       
    77 
    75     int printed;
    78     int printed;
       
    79 
    76     LONG *values;
    80     LONG *values;
       
    81 
    77     LONG *z;
    82     LONG *z;
    78 
    83 
    79     int found;
    84     int found;
    80 
    85 
    81     if (verbose) {
    86     if (verbose) {
   141 };
   146 };
   142 
   147 
   143 int main (int argc, char **argv)
   148 int main (int argc, char **argv)
   144 {
   149 {
   145     LONG *values;
   150     LONG *values;
       
   151 
   146     LONG *numbers;
   152     LONG *numbers;
       
   153 
   147     LONG max;
   154     LONG max;
   148 
   155 
   149     int i, j;
   156     int i, j;
   150 
   157 
   151     int found;
   158     int found;
       
   159 
   152     int loop;
   160     int loop;
   153 
   161 
   154     int verbose, wide, end, num;
   162     int verbose, wide, end, num;
   155 
   163 
   156     verbose = wide = 0;
   164     verbose = wide = 0;