A character and a sentence are written in one line separated by a space. Write a program that counts how many words in a sentence that end in a given character. There is only one space between words in the sentence, there are no spaces at the end and at the beginning.
Sample input and output
Test number |
Input |
Output |
1 |
a b |
0 |
2 |
t test word |
1 |