I'm writing a C program in class that requires us to input dates as integers in a structure defined as:
typedef struct date{
int month;
int day;
int year;
}Date;
Now that really would not be a problem except it requires that you can only input it as mm/dd/yyyy.
I was thinking if maybe I can input it as a string and just use a loop to seperate the three into other variable strings and convert those to int.
But then I remembered that
printf("Enter Date (MM DD YYYY): ");
scanf("%d %d %d",&...);
is possible. Is there a way to just 'ignore' '/' all together?