Daywalker-
October 31st, 2007, 04:25 PM
Can anyone help me, i dont know where to start or what to do for this program. Any help would be greatly appricated!
Write a C++ main program that stops reading text when a period is entered. The program then displays the “sentence” with corrected spacing and capitalization. This means only one blank between words, no blank before punctuation, no blanks before the first word, only the first letter of the first word capitalized and all the other letters in lower case. The program should allow multi-line entry.
For example,
This program removes extra spaces and corrects capitalization
Please enter a sentence ending with a period.
iT cErtainly DOES nO good to TeLl a
fruStrateD user THAt : the prOGram, quite clearly
, teLLS you TO enter AN integeR .
It certainly does no good to tell a
frustrated user that: the program, quite clearly,
tells you to enter an integer.
Press any key to continue
Use cout for prompting the user and output. I would recommend cin.get() for character by character checking but you can use any method that works for you.
Write a C++ main program that stops reading text when a period is entered. The program then displays the “sentence” with corrected spacing and capitalization. This means only one blank between words, no blank before punctuation, no blanks before the first word, only the first letter of the first word capitalized and all the other letters in lower case. The program should allow multi-line entry.
For example,
This program removes extra spaces and corrects capitalization
Please enter a sentence ending with a period.
iT cErtainly DOES nO good to TeLl a
fruStrateD user THAt : the prOGram, quite clearly
, teLLS you TO enter AN integeR .
It certainly does no good to tell a
frustrated user that: the program, quite clearly,
tells you to enter an integer.
Press any key to continue
Use cout for prompting the user and output. I would recommend cin.get() for character by character checking but you can use any method that works for you.