fork(2) download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. char frase[200];
  5. printf("String: ");
  6. scanf("%200s", frase);
  7. for (char *i = frase; *i != '\0'; i++) {
  8. *i += *i < 'A' || *i > 'Z' ? 0 :
  9. *i > 'W' ? -23 : 3;
  10. }
  11. printf("String: %s", frase);
  12. }
  13.  
  14. //https://pt.stackoverflow.com/q/213908/101
Success #stdin #stdout 0s 4300KB
stdin
ABCGVWXYZ12M#
stdout
String: String: DEFJYZABC12P#