I'm trying to run a simple C program on my Mac. It worked fine for a while but then suddenly scanf stopped working. I basically want to read in an integer value and output what was entered. No matter the integer I enter the program keeps outputting 0. I've tried the suggestions here but nothing works. I've tried running the program in both terminal and xcode but still nothing. Any ideas?
#include <stdio.h>
int main(){
  int numberOfElements = 0;
  scanf("Number of elements: %d",&numberOfElements);
  printf("%d\n",numberOfElements); //keeps returning 0 no matter the number I enter
  return 0;
}
 
     
     
     
    