whats wrong in my codes
1) main()
is an INT function
2) define
ing printf and scanf makes the code difficult to follow and is unnecessarily confusing
3) As pyTony mentions, you need to format your code properly.
4) Use a standard function (getchar()
) instead of the nonstandard getch()
.
That's what I see.
Also, when asking for help, details are important. "Wrong Answer" tells us nothing. What did you get and what did you expect based on what input was used?