Originally Posted by Nalif
Post three may tell me not to use scanf, but why would I use code when I have no idea what it does? I posted here asking why my code didn't work as expected, not how to completely rewrite it just because scanf is considered to be broken. I'm learning from a book. At the end of each chapter are excersizes that you should be able to complete with the knowledge you have learned from each previous [COLOR="Magenta"]chapter. Right now, the only thing I understand is scanf. Not sscanf, not fgets, nothing. So again, why would I use these functions when I don't understand them, and up until this point have not even heard of? The object of doing these excersizes is to understand the code, not use more efficient functions that are built into C that I know nothing about. If I start throwing in things that I haven't learned about, not only will I not learn anything, but I'll be confused if I come back to this code at a later date for guidance.