// Words.cpp (c) Kari Laitinen // http://www.naturalprogramming.com/ // 1997-??-?? File created. // 2013-11-06 Last modification. #include using namespace std ; int main() { char character_in_sentence ; cout << "\n This program separates the words of a sentence and" << "\n prints them in wide form. Type in a sentence.\n\n "; cin.get( character_in_sentence ) ; cout << "\n " ; while ( character_in_sentence != '\n' ) { if ( character_in_sentence == ' ' ) { cout << "\n " ; } else { cout << " " << character_in_sentence ; } cin.get( character_in_sentence ) ; } }