• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

How to fix this to take in the ASCII Value

mOeeOm

Platinum Member
The value entered needs to be read in as an ASCII value and added to 32 or minus 32, then the new value comes out as the ASCII.

So if they enter A, the ASCII value is 65, so it will be 65 + 32 and it will spit out a. But when I run the program I don't get anything, just a blank screen. Any help would be appreciated.

thanks.
 
There's a newline left in the input buffer after the initial scanf().

The quick fix would be to call getchar() after it (so the \n is not left for the subsequent scanf()).
 
Originally posted by: xcript
There's a newline left in the input buffer after the initial scanf().

The quick fix would be to call getchar() after it (so the \n is not left for the subsequent scanf()).

this is a bigenner programming course, so I don't quite understand:

--- blah.c~ 2006-03-07 20:17:37.347856500 -0800
+++ blah.c 2006-03-07 20:11:41.717631000 -0800
@@ -11,6 +11,7 @@

can you go into more detail there?
 
Back
Top