When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
8 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
put your scanf into the while loop, and initialize the variables with zero so its not filled with wrong numbers
Would need to get a line as string and attempt sscanf on that.
also ig thats the wrong channel its C code #1013104018739974194
The function will return the number of inputs it successfully read, and you can check to only proceed if it reports 2.
this is def a better way yea
About why just scanf doesn't work, it's because if only one number is entered, the terminal will wait for the second one.
oh sorry