output must be:
Enter your birthday:
zodiac sign is:
lucky color:
lucky number:
message:
the program should only ask the birthday of the user then the zodiac,number,color and message is automatically displayed. the program will not end until the user wants to.
typedefstruct _DATE_EDGE_
{
int date;
char mon[12];
}DateEdge;
typedefstruct _SIGNS_
{
DateEdge Min;
DateEdge Max;
char zodiac[15];
char color[10];
unsignedshort luckyno;
char message[50];
} Signs;
Signs tmp[12]; //Array of Struct = 12
for (i=0;i<12;i++)
{
/* Fill the Structure with mix,max date of each Sign*/
}
/* now get input from user */
int date;
char month[10];
scanf("%d",&date);
scanf("%s",month);
for (i=0;i<12;i++)
{
if(!strcmp(tmp[i].min.month,month))
{
if(tmp[i].min.date <= date)
{
/* printf Everything for this Struct */
}
}
if(!strcmp(tmp[i].max.month,month))
{
if(tmp[i].max.date > date)
{
/* printf Everything for this Struct */
}
}
}