Write a program that starts with a line of text and then outputs that line of text with the first occurrence of "hate" changed to "love".
For example, a possible sample output might be The line of text to be changed is:I hate you.I have rephrased that line to read:I love you.Hint: You may consider use the methods: indexOf(A_String) and substring(Start, End) in your program.
使用Google Drive 進行同步編輯
10 年前
沒有留言:
張貼留言