What do I need to do in order to fix this infinite loop and get the expected outputs?

Pages: 12
I think your code is better, TheIdeasMan.
Great, thanks for that.

My hope is that you learnt something along the way. I don't normally write code for anyone, I prefer to give them hints, so they figure stuff out for themselves.

Any way - Good luck !!!!
Oh.... You... won the battle.

Ok. I've just learned something. I and you, who'll win? You made a lot of changes for the andy 2012 source, then your solution is simpler, shorter, smarter and (maybe) better than mine. I argee. I, sorry andy2012 for a very 'bad' source because it's complex (tiny changes) and may be hard to view and understand (although it's correct).

Now, and in future, and forever, I'll apply the maximum code writing optimization tweaking methods from my experience and my knowledge...
I'll be more careful and write carefully comment lines and usage for any further source..you wait, watch and love to fight it, TheIdeasMan???
Edit : Don't usually call me (Jackson). I'm Marie. Forgot???
Good luck all days, TheBestIdeasMan!!!
Happy fighting!!
XDXD Haha....
Last edited on
@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.

(although it's correct).

I disagree.

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.
Topic archived. No new replies allowed.
Pages: 12