先从键盘输入一个文本文件的文件名(约定:字符数≤127字节,可含路径)和一个字符串(约定:字符数≤20字节,其中不含空格、TAB等,后面称之为Str),再在屏幕上显示该文件的内容。要求显示完内容后,在屏幕上输出文件的行数(行之间以’
’为分隔、每行的长度不定但均≤200个字节)、字符串Str在文件中第1次出现的行号和最后一次出现的行号(查找时不区分大小写、不跨行查找,若未找到,则行号显示为-1)。
(Start with the keyboard input of a text file name (convention: the number of characters to ≤ 127 bytes, and can contain the path) and a string (convention: the number of characters ≤ 20 bytes, which contain spaces, TAB, followed by call Str), the contents of the file is displayed on the screen. Requests display content on the screen the number of rows of the output file (the line between ' n' separated, each line has a variable length but ≤ 200 bytes) string Str file a (find the line number and the last line number is not case-sensitive, cross-bank does not find, If you do not find the line number is displayed as-1).)