Answers for "how to take user input in cpp separated by spaces"

C++
1

how to take space separated input in c++

string z,s;
 while (true)
    {
      cin>>z;
      s+=z;
      if(cin.peek()=='n')
      break;
    }
................................
	        OR/
.................................
string s;
getline(cin,s);
Posted by: Guest on July-10-2021

Code answers related to "how to take user input in cpp separated by spaces"

Browse Popular Code Answers by Language