|
1) デ−タファイル(ファイル名sumo.d)がある。このファイルの内容を次に示す。
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
Yesterday when I got on the train in Shibuya, I had a big
surprise, and I mean big! There were three sumo wrestlers on the
train. I was standing by the door right next to one of them, but I
didn't recognize him. The other two were sitting behind me. I really
:
:
aprons, I think, "Wow! I'm really in Japan," and I feel happy to
be here. And that was just how I felt on the train yesterday too.
File end NHK ラジオ英会話テキストより
----+----1----+----2----+----3----+----4----+----5----+----6----+----7
前後の目盛りの行は除く。このファイルを読んで、文字 A または a 、文字列 The または the がファイル中に何個含まれているか数えよ。ファイルの終わりは行の先頭の文字列'File end'で判断し、その行は対象としない。
2) 1)のデータファイルを読んで、使用されている単語と単語の使用度数を調べ、使用度数の高いものから順に単語とその使用度数を10個まで出力せよ。The と the のような大文字と小文字の違いは別の単語として数えてよい。
|
