fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. char letter; // Current char in phone number string
  5.  
  6. scanf("%d", &letter); // Reads first char of user input
  7.  
  8. while (letter != '\n') {
  9. if(letter>'c') && (letter <='z'){
  10. printf("%c", letter26-3);
  11. else if (letter >='a') && (letter <='c'){
  12. printf("%c", letter+23);
  13. }
  14. else
  15. printf("%c", letter);
  16. scanf("%c", &letter);
  17. }
  18. printf("\n"); // your code goes here
  19. return 0;
  20. }
  21.  
Compilation error #stdin compilation error #stdout 0s 9432KB
stdin
hyhub gdb, zh fkdqjh wkh zruog, exw wr fkdqjh wkh zruog lq d zdb wkdw phdqv dqbwklqj, wkdw wdnhv pruh wlph wkdq prvw shrsoh kdyh. lw qhyhu kdsshqv doo dw rqfh. lw'v vorz. lw'v phwkrglfdo. lw'v hakdxvwlqj. zh grq'w doo kdyh wkh vwrpdfk iru lw.
compilation info
prog.c: In function ‘main’:
prog.c:6:11: warning: format ‘%d’ expects argument of type ‘int *’, but argument 2 has type ‘char *’ [-Wformat=]
   scanf("%d", &letter);  // Reads first char of user input
           ^
prog.c:9:21: error: expected identifier before ‘(’ token
   if(letter>'c') && (letter <='z'){
                     ^
prog.c:20:1: error: expected declaration or statement at end of input
 }
 ^
stdout
Standard output is empty