Write a program to scan and print entered string. string should scan up to new line.(Should allow scan of spaces also).
#include<iostream> using namespace std; int main() { string s; cout << "Enter String = "; getline(cin,s); cout << "String = " << s << endl; return 0; }
Output
Enter String = Lot To Learn String = Lot To Learn