0
Write a program which take a sting from used and later display on screen i want it in easily manner
2 ответов
0
#include<iostream>
#include<cstdlib>
using namespace std;
int main()
{
string mystr;
getline(cin,mystr);
cout<<mystr<<endl;
return 0;
}
if we take directly the input using cin....it considers only till the occurance of first whitespace...Inorder to avoid that, we will use getline...
0
you can also use cin to take an input from user and stores it in a string variable