I want to make a birthday date registration system. The final doubt is: how do I print the anniversary: 1/12/1990, 12/2/1977, 09/13/1999 and 19/04/1987. They would be the examples of the printing of the dates, but I get several numbers that have nothing to do. Follow the code.
#include <stdio.h>
#include <stdlib.h>
typedef struct
{
int dia;
int mes;
int ano;
} data;
int main()
{
data data_aniversario[4];
int i=0;
while (i<4)
{
printf("Preencha sua data de nascimento\n\n");
printf("Digite o dia: ");
scanf("%d", &data_aniversario[i].dia);
printf("\n\nDigite o mes: ");
scanf("%d", &data_aniversario[i].mes);
printf("\n\nDigite o ano: ");
scanf("%d", &data_aniversario[i].ano);
}
printf("\n\nA data do seu aniversário é: \n");
printf("%d/%d/%d\n", data_aniversario.dia, data_aniversario.mes, data_aniversario.ano);
system ("pause");
return 0;
}