chore: Lab04

This commit is contained in:
Fándly Gergő
2020-03-28 15:04:49 +02:00
parent 430a0aa45e
commit f5645fca66
4 changed files with 353 additions and 0 deletions

23
lab03/01.cpp Normal file
View File

@ -0,0 +1,23 @@
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cout<<"Introduce a line: ";
string line;
getline(cin, line);
cout<<"Line broken into separate words:\n";
istringstream sstream(line);
string word;
while(getline(sstream, word, ' ')){
cout<<word<<"\n";
}
cout.flush();
return 0;
}