fork(2) download
  1. #include <stdio.h>
  2. #include <string.h>
  3.  
  4. int main(){
  5.  
  6. char frase[200];
  7.  
  8. strncpy(frase, "AZ", 200);
  9.  
  10. for(int i=0; i < strlen(frase); i++){
  11.  
  12. if(frase[i] >= 65 && frase[i] <= 90){
  13. frase[i] = (((frase[i] - 65) + 3) % 26) + 65;
  14. }else{
  15. frase[i] = 32;
  16. }
  17.  
  18. }
  19.  
  20. printf("String: %s", frase);
  21. }
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
String: DC