#include <stdio.h>
int main()
{
char name[10];
int birth_year;
printf("Enter your name : ");
scanf("%c",name);
printf("Enter your birth year : ");
scanf("%i",&birth_year);
int age = 2020 - birth_year;
printf("Your age is %i",age);
}
I am trying to take the value of birth_year as an input but it automatically assigns it to 0 for some reason what am I doing wrong