Astrological Sign (2)

  1. Modify your previous homework about astrological sign, so that function order() has a single parameter of type "struct tm", instead of two parameters of type integer.
  2. Moreover, modify your main program, so that it will also verify the age of user (according to the input birthday), and respond accordingly.
  3. In the program written by the TA, functions mktime(), time(), and difftime() are utilized. You may check the manpages and try other combinations to obtain the same result.
    The program may run as follows.
    
    ================================================
    Input the year, month and day of your birthday, separated by spaces.
    Supply 3 zeros when you want to terminate the program.
    1900 1 1
    Your astrological sign is Capricorn
    It's hard to imagine that you are older than 100 years old.
    ================================================
    Input the year, month and day of your birthday, separated by spaces.
    Supply 3 zeros when you want to terminate the program.
    2020 2 2
    You are not born yet!
    ================================================
    Input the year, month and day of your birthday, separated by spaces.
    Supply 3 zeros when you want to terminate the program.
    2016 4 1
    Your astrological sign is Aries
    It's hard to believe that you are younger than 1 year old.
    ================================================
    Input the year, month and day of your birthday, separated by spaces.
    Supply 3 zeros when you want to terminate the program.
    0 0 0