A message for Linux.com registered users: We are in the process of making changes to the Linux forums. Starting Monday, 8/13/18 at 6:00 PM PT, you will be unable to access the forums. They will re-launch as soon as possible on Wednesday, 8/15/18 with new features and improved functionality. Thank you for your patience and stay tuned for the new improved forums.

April 28, 2012

trouble with c

hey, i'm trying to learn c so i wrote a program that doesn't do exactly what i want it to, try as i might i couldn't find the bug so i was hoping you could help me out.

here's the program: http://pastebin.com/1uYraxeM

and here's the input, output, and expected output: http://pastebin.com/7bmEuvP8

any help you could give me i would be very greatful for

Click Here!