Number of Capital Letters

I need to write a value-returning function whose argument is a string and returns the number of capital letters in the string. So far I think the structure of the program will be:

-Get string input from user
-Pass it to another function as string
-Then that function will convert all the capital letters to lowercase using the "tolower" function. And everytime a character is converted, have a variable of type int increase every time the "tolower" function is used.

I tried coding it but I end up with logical errors.

post your code, lets have a look at it.
I got it.
Topic archived. No new replies allowed.