I just encountered this little issue while I was trying to create an enhanced version of textbook example. I kept getting this error message after typing numbers that scanf required. It turned out that I missed a & character in front of my variable in scanf. It passed compiler with no error…… It took me few minutes to find it out……and yeah, I am so stupid haha.