-->
当前位置:首页 > 题库

PROGRAMMING:Find string

Luz5年前 (2021-05-10)题库534
Programming implementation:
Enter a positive integer repeat (0 < repeat < 10) and perform the following operations:
Enter a character, and then enter a string ending with carriage return (less than 80 characters). Search for the character in the string. If found, output the maximum subscript of the character in the string (subscript starts from 0); Otherwise, output "not found". The output format is "index% D / N"
Input and output example: description in brackets
###Input example:
```in
two ( repeat=2)
M (character'm ')
programming ( String "programming")
a ( Character 'a'
one thousand two hundred and thirty-four ( String "1234")
```
###Output example:
```out
index = 7 (' The maximum subscript of M 'in "programming" is 7)
Not Found (" There is no 'a' in 1234 "
```






answer:If there is no answer, please comment