# Include "stdio. H"
# Include "stdlib. H"
Main (INT argc, char * argv [])
{
File * fp_dic;
Int year;
Int month;
Int Day;
Printf ("************************************* * *************************/N ");
Printf ("NOTE: This is the program that generates a simple birthday dictionary/N ");
Printf ("Author: ameihong/N ");
Printf ("unit: Information Security Major of Sichuan Normal University/N ");
Printf ("Contact: QQ 18184412 e-mail anmeihong@sina.com/N ");
Printf ("************************************* * *************************/N ");
If (argc! = 2)
{
Printf ("Usage: [file name] [dictionary path]/n ");
Printf ("Example: dic c: // dic.txt/N ");
} // Whether the input parameters are correct
If (fp_dic = fopen (argv [1], "W") = NULL)
{
Printf ("An error occurred while creating the dictionary file! Exit/N ");
Exit (0 );
}
For (year = 1980; year <1991; year ++) // year can be changed to the date you want
For (month = 1; month <13; month ++) // month
For (Day = 1; day <32; day ++) // day
{
Fprintf (fp_dic, "% d/N", year, month, day );
} // Save the generated dictionary
Fclose (fp_dic );
Printf ("the dictionary is successfully generated and saved to the file % S. Thank you for using it! /N ", argv [1]);
}