@Jackson Marie (81)
It's not about battling or fighting with each other - it's about providing good advice to the OP. That is the whole idea of the forum.
IMO you are not doing that - either you are doing it to provoke comment (aka trolling), or you just don't know enough to provide advice to others.
That is why I am so critical of your posts - bad advice wastes peoples time. Maybe that is your aim if you are trolling. If you are not trolling then at least make very sure that your advice is correct before posting.
Things that should be provided to the OP:
- Hints & clues to the solution - not all the code - don't do their homework.
- Code snippets in C++, not badly written C. This is a C++ forum.
- Code snippets that work.
- Properly formatted easy to read code.
- links to where they can find info on how things work.
You say you use VS - why is your code so poorly formatted?
You show C code, but you don't even use scanf properly, and you don't seem to understand floating point properly.
Providing advice is often more than just tweaking the OP's code - it is about providing an elegant and efficient solution - or hints towards that.