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

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

void main()
{
    int d,m,y;
    clrscr();
    cout<<"Enter any date in formate (DD/MM/YYYY) : ";
    cin>>d;
    cout<<"-";
    cin>>m;
    cout<<"-";
    cin>>y;
    cout<<"\nDay = "<<d<<"\nMonth = "<<m<<"\nYear = "<<y;
    getch();
}


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