View Single Post
  #2 (permalink)  
Old 09-16-2008, 11:46 AM
WingedPanther's Avatar   
WingedPanther WingedPanther is offline
Super Moderator
 
Join Date: Jul 2006
Age: 35
Posts: 4,092
Last Blog:
Why Learn Data Structu...
Credits: 28
Rep Power: 45
WingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to beholdWingedPanther is a splendid one to behold
Default Re: Ceasar shift program troubles

What's happening is that when the code encounters a space, it processes TWO printf statements, one for the space, and one for the previous output. I would move the printf("%c",output); inside your if block.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum
Programming is a branch of mathematics.
Reply With Quote