Im following a youtube tutorial by Bucky in C programming. Every time i use scanf and enter the input i get an error pop up. i typed these exact same codes from the video tutorial but mine does not work.
HERE'S THE CODE:
int main()
{
int age;
printf("How old are you?\n");
scanf("%d, &age");
if (age>= 18){
printf("You may enter this website!");
}
if(age<18){
printf("nothing to see here!");
}
return 0;
}
It only works after compiling and running. But after i input the age, an error window pops up and says "A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available."
I'm sure the codes are correct but What is causing this? Help me please so i can move forward.