Hello everyone. I'm studying C++ as a required course for my program which is sustainable and renewable energy engineering. So our Dr gave us this homework and I just can't figure out how to begin to do this C++ program. The Question is this:
"Using (do while) statemant write a program that asks the user to input a sequence of character until encoutring a period("."). The Program shall print out how many small letters, capital letters, and special characters uncluding (".") the period.
Example run :
Enter a stnence that ends with a period : This is C++ class, isn't it?.
The number of small letters are : 16
The number of Capital letters are : 2
The number of Special Char are : 7 "
I don't know how to read each character in one sentence not to mention how to know if it's a upper case letter or down case letter.
Our Doctor gave us the homework and left without letting us to ask him.
Can u please help me in this?
You do not read all characters in one sentence, you read each character individually. And compare it to array of Capital letters and array of small letters. If it is neither, it is special character. And you take c++ book in hands and read it.