<code>
#include <stdio.h>
#include <stdlib.h>
#include "structure.h"

 int main()
{
    struct user hayden;
    char answer[5];

    puts("Enter userID : \n");
    gets(hayden.userID);

    puts("Enter your first name : \n");
    gets(hayden.firstName);

    puts("Enter your last name : \n");
    gets(hayden.lastName);

    puts("Enter your age : \n");
    scanf(" %d", hayden.age);

    printf("Enter your weight : \n");
    scanf( " %f", hayden.weight);

    printf("Would you like to check the user information? Y/N");
    scanf(" %s", answer);

    if( answer == 'Y')
    {
        printf(" User ID : %s", hayden.userID);
        printf(" First name : %s", hayden.firstName);
        printf(" Last name : %s", hayden.lastName);
        printf(" age : %d", hayden.age);
        printf(" weight : %f", hayden.weight);

    }
    else
  {
       return 0;
  }

}
</code>
this is the main code and 
<code>
struct user {
char userID[20];
char firstName[25];
char lastName[25];
int age;
float weight;
};

</code>
this is structure.

program initially runs fine but it crashes upon entering age value.

can anyone tell me what part of my code is wrong?