> I Enter Every thing its asks for
Yep, but what you you actually enter?
Let me clarify. The code isn't everything. The contents of the variables are relevant too. And these depend on what you enter. So not giving any input is as useful as only giving us part of the code (i.e. not at all).
Also if you show the output (and explain why it is wrong, i.e. what you expected it to show) then that makes debugging not just easier but possible. So there's no point me even starting to look at the code unless I have some idea what it's likely to do, and that depends critically on what input you give it.
One thing you could try is to add some debugging printf statements to the code that show you where it's up to, what the value of certain variables are and which way it goes at if statements. This kind of tracing can be very useful in debugging. Actually it's about a bazillion times easier with a debugger cos you can just step through the code as it's executing and see where it goes wrong.