Advertisement
Lisaveta777

mistake

Aug 16th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <ctype.h>
  4.  
  5. //putchar suppose to output changed c, in case putchar(c+3) there was mistake, which was not obvious for me
  6. //putchar put cursor at the beginning of second line, so I had to tape over it!!!
  7. //then i got it: it's just happened that '\n'+3 equals go to the start of current line
  8.  
  9. int main()
  10. {
  11.     int c;
  12.  
  13.     while((c=getchar())!=EOF)
  14.     {
  15.        // putchar(c);
  16.         //putchar(++c);
  17.         putchar(c+3);//
  18.     }
  19.  
  20.      return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement