Computer Science, asked by arun571823, 2 months ago

define sturture data containing integers day month year, write a program using function to read data​

Answers

Answered by lilidey81
0

Answer:

include

struct date

{

int day,month,year;

};

struct date take(struct date t)

{

printf("\nEnter the date, month and year::");

scanf("%d%d%d",&t.day,&t.month,&t.year);

return t;

}

void display(struct date t)

{

switch(t.month)

{

case 1:

printf("JANUARY");

break;

case 2:

printf("FEBRUARY");

break;

case 3:

printf("MARCH");

break;

case 4:

printf("APRIL");

break;

case 5:

printf("MAY");

break;

case 6:

printf("JUNE");

break;

case 7:

printf("JULY");

break;

case 8:

printf("AUGUST");

break;

case 9:

printf("SEPTEMBER");

break;

case 10:

printf("OCTOBER");

break;

case 11:

printf("NOVEMBER");

break;

case 12:

printf("DECEMBER");

break;

Similar questions