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 more information use !howto ask.
1 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 more information use !howto ask.
The part in black is what I am gettign in my terminal adn the numbers are the file that I am using (test.txt)
You're using scanf wrong (need to do &number) and at least the code you posted doesn't read from any file and it also doesn't allow you to enter 20 integers. I'm actually quiet surprised this compiles in the first place.
Also in general you shouldn't use scanf: https://sekrit.de/webdocs/c/beginners-guide-away-from-scanf.html
you hit undefined behavior when you use the variables before you give them a defined value
oh lol yeah, I am a beginner and I am not sure if my code was coherent
Thank you so much though! I will look into the scanf and the variables part
This question thread is being automatically closed. If your question is not answered feel free to bump the post or re-ask. Take a look at !howto ask for tips on improving your question.