error: expected primary-expression before '%' token

#include <stdio.h>

int main()
{

   int age = 0;                                
   
printf("How old are you?");
scanf("%d", %age);                   
printf("You are %d years old." , age);
   
   return 0;
}


Why am i getting this error, i tried just to declare integer age without giving it 0 value still doesnt work.
1 comment
Comment actions Permalink

Hi Uros.

I suppose that you've a misprint. Please use scanf("%d", &age);

0

Please sign in to leave a comment.