fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i;
  5. char s[100];
  6. scanf("%s", s);
  7.  
  8. // ここを編集する
  9. for (i = 0; s[i] != '\0'; i++) {
  10. if (s[i] == '1') {
  11. s[i] = 'I'; // '1' を 'I' に置き換える
  12. }
  13. }
  14.  
  15. printf("%s\n", s); // 結果だけ表示
  16.  
  17. return 0;
  18. }
  19.  
  20.  
Success #stdin #stdout 0.01s 5288KB
stdin
1iIi
stdout
IiIi