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

PROGRAMMING:Counts the position of the nth occurrence of a character in a string

Luz5年前 (2021-05-10)题库386
Enter a string s, a number N and a character c to count the position of the character C in the string s for the nth time
###Input format:
Enter 3 lines. The first line is the string s, the second line is the number n, and the third line is the searched character C.
###Output format:
The position value of the nth character in the string. If the nth character C does not exist in the string, print out 'no'
###Input example:
```in
abcabcabc
two
a
```
###Output example:
```out
four
```







answer:If there is no answer, please comment