A program that read any date in the format DD-MM-YYYY & displays day, month & year separately in C.

#include<stdio.h>
#include<conio.h>

void main()
{
    int d,m,y;
    clrscr();
    printf("Enter any date in formate (DD-MM-YYYY) : ");
    scanf("%d-%d-%d",&d,&m,&y);
   
    printf("\nDay = %d\nMonth = %d\nYear = %d",d,m,y);
    getch();
}



///////////////////////////////////////////////////////////////////////////
Copy & paste this code in your TC & run, then you will get output.......
If you have any problem please comment below.........