Guangzhou Several donor egg donor egg agencies do a test tube package gender successful election

 Guangzhou Wei donor egg agencies electric █ 188 ★ 2335 ★ 0811 ████ ███ sex tube selected for egg IVF surrogacy ███ choose the gender of a boy born ████ ████ tube package surrogate boy ███ █ ███ surrogate birth surrogacy package selected IVF surrogacy boy ███ █████ ██ gender
recorded by staff numbers and birth year, month, date of formation, it has the data in the main function of N officers will structure into an array of std. In fun function to find out who designated the year of birth, and their data stored in an array parameter k points, the number of returnees to meet the specified criteria. A main function in the input year, year of birth if this person is not found, the information corresponding to the output; if this person's year of birth is found, the output of the relevant personnel information.
    #include    
    #define N. 8
    typedef struct
    {char NUM [. 4];
        int year, month The, Day;
    } the STU;
    int Fun (STD * the STU, the STU K *, int year)
    {int I, n-= 0;
        for (I 0 =; I
            IF ((. 1) == year)
                {K [n-] = (2);
                 n-++;
}
        return ((. 3));
    }
    int main (void)
    {   STU  std[N]={ {"001",1984,2,15},{"002",1983,9,21},{"003 ",1984,9,1},{"004",1983,7,15},
                      {"005",1985,9,28},{"006",1982,11,15},{"007",1982,6,22},{"008",1984,8,19}};
        STU  k[N];
        int  i,n,year;
       
  scanf("%d",&year);
        n=fun(std,k,year);
        if(n==0)
            printf("No person was born in %d \n",year);
        else
        {   
            for(i=0; i
              printf("%s,%d-%d-%d\n",k[i].num,k[i].year,k[i].month,k[i].day);
        }
        return 0;Enter a year, if found to between separated by commas, to date this year of birth between staff, everyone branch output data, number and date "-" interval; if this year does not find birth peopleRequirements:
    }

Guess you like

Origin www.cnblogs.com/ITjshdx/p/10959329.html