Program to Set a Structure to Hold a Date (Month, Day, Year)

Write a Program to set a structure to hold a date(month, day, year). Assign values to members of structure and print out the values in the format :dd/mm/yy by function. Pass the structure to the function.
Algorithm:
- Start
- Define an structure date with members month ,day and year.
- Create a function date_format(date).
- Enter date in main function.
- Display date
Source Code
#include<iostream.h> #include<conio.h> typedef struct { int day; int month; int year; }date; void date_format(date); void main() { date d={3,7,2014}; clrscr(); date_format(d); getch(); } void date_format(date d) { cout<<"Current Date :"<<d.day<<"//"<<d.month<<"//"<<d.year; }