星期一, 3月 02, 2009

Lab String Processing

Do Project 5 of Chap. 1 on Page 56.

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.

33 則留言:

Unknown 提到...
作者已經移除這則留言。
Unknown 提到...

9427208 資工四乙 黃崇傑

test 提到...

電子三乙 9526215 吳國志

匿名 提到...

電子三乙 9526239 王聖傑

s9526134 提到...

電子三甲 9526134 李政洵

匿名 提到...

電子2甲9626104陳彥瑋

迪西 提到...

9526336 電子三丙 江季軒

Edmund 提到...
作者已經移除這則留言。
匿名 提到...
作者已經移除這則留言。
匿名 提到...

電子二乙 9626250 施博鐘

匿名 提到...

電子二甲 9626126 王柏仁

匿名 提到...

電子二丙 9626325 黃士誠

dale 提到...

電子2丙 9626358 陳柏瑞

匿名 提到...

電子三乙 9526242 陳柏瑞

匿名 提到...
作者已經移除這則留言。
匿名 提到...

電子二丙 9626365 龔伯勤

Edmund 提到...

電子三丙 9526342 李忠展

匿名 提到...

9526357 電子三丙 施柏羽

匿名 提到...

電子二甲 9626155 張鴻彬

匿名 提到...

電子二丙 9626351 許哲銘

大Q 提到...

電子二甲 9522154 周怡君

匿名 提到...

9626310 電子二丙 藍威長

匿名 提到...

9626315 電子二丙 陳子傑

提到...

電子四丙 9426366 黃峻楷

匿名 提到...

電子三甲 9526118 陳詠敬

匿名 提到...

電子三甲 9526133 彭榜揚

匿名 提到...

電子二丙 9626302 王竣右

匿名 提到...

電子二乙9626215廖姿雅

匿名 提到...

9426353 電子四丙 吳冠廷

匿名 提到...

電子二乙 9626203 鄭曜鐘

匿名 提到...

電子二乙 9626260 郭家源

匿名 提到...

9528231 電機三乙 吳舒旻

匿名 提到...

s9626237電子二乙 艾禮之