This repository has been archived on 2024-12-16. You can view files and clone it, but cannot push or open issues or pull requests.
CodeBlocksPortable/WATCOM/samples/cplbexam/iostream/istream/rshchar.cpp

14 lines
256 B
C++

#include <iostream.h>
void main( void ) {
char ch;
cin.unsetf( ios::skipws ); // turn off the function to skip whitespaces
cout << "Enter a string: " << endl;
do {
cin >> ch;
cout << ch;
} while( ch != '\n' );
}