Should be:
scanf("%d", &userChoice);
Need the ampersand to read it into the location of userChoice, and not the value of userChoice.
Should be:
scanf("%d", &userChoice);
Need the ampersand to read it into the location of userChoice, and not the value of userChoice.