Sunday, March 14, 2021

1.20. Write a program that read any date in the format DD/MM/YYYY and displays day, month and year separately.

#include<stdio.h>
#include<conio.h>
void main()
{
int d,m,y;
clrscr();
printf("Enter any date in format (DD/MM/YYYY):");
scanf("%d%d%d", &d,&m,&y);
printf("Date is: %d%d%d", d,m,y);
getch ();
}

No comments:

Post a Comment