fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int i;
  5. char s[100];/*配列を宣言する*/
  6. scanf("%s",s);/*配列を読み込む*/
  7. printf("%s\n -> ",s);/*配列を表示*/
  8. for(i=0;s[i]!='\0';i++){
  9. if(s[i]=='1'){/*要素が1ならそこにIをいれる*/
  10. s[i]='I';
  11. }
  12. }
  13. printf("%s\n",s);
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5248KB
stdin
1NFORMAT1ON
stdout
1NFORMAT1ON
  -> INFORMATION