fork download
  1. #include <stdio.h>
  2.  
  3. void replaceOneWithI(char s[]) {
  4. for (int i = 0; s[i] != '\0'; i++) {
  5. if (s[i] == '1') {
  6. s[i] = 'I';
  7. }
  8. }
  9. }
  10.  
  11. int main() {
  12. char s[1024];
  13. scanf("%s", s);
  14. replaceOneWithI(s);
  15. printf("%s\n", s);
  16. return 0;
  17. }
Success #stdin #stdout 0s 5284KB
stdin
1NFORMAT1ON
stdout
INFORMATION