马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
第一题:COUNTING BOBS数bob (15/15 points) Assume s is a string of lower casecharacters. Write a program that prints the number of times thestring 'bob' occurs in s. For example, ifs = 'azcbobobegghakl', then your program should print从s字符串中输出bob的出现次数,输出结果如下: Number oftimes bob occurs is: 2
第二题:ALPHABETICAL SUBSTRINGS按字母顺序排列的子字符串 (15/15 points) Assume s is a string of lower casecharacters. Write a program that prints the longest substringof s in which the letters occur in alphabetical order. For example,if s = 'azcbobobegghakl', then your program should print输出s字符串中最长的子字符串(该字符串按字母排序) Longestsubstring in alphabetical order is: beggh
希望各路高手帮帮忙!最好附上解答思路!
|