What do you have so far? We'll gladley edit your code if it needs it but this is clearley a homework assignment and we have a pretty strict and well followed policy about that.
write a c++ prog.to promot for and input several lines with exactly two char per input line the input will terminate when the first char of some input pair is an asterisk (*)excluding the last pair containing the asterisk the program must count and output
1-the total number of times a(?)was encountered
2-the total num of pairs whose first and second char matched