I'm trying to create a code that accepts a date, however I want to give the user the ability to enter the date as dd/mm/yyyy or dd-mm-yyyy. My code is below, I tried to use %*C but its a cheat method as you can enter anything between the numbers in the date
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
int main ()
{
int dayA, monthA, yearA;
printf("First date in format DD/MM/YYYY or DD-MM-YYYY: ");
scanf("%d%*c%d%*c%d", &monthA, &dayA, &yearA);