Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- SetConsoleCP(1251);
- freopen("input.txt","r",stdin);
- freopen("output.txt","w",stdout);
- char c;
- string line;
- while(scanf("%c", &c)==1)
- {
- if(c=='\n' || c == EOF)
- {
- cout << line;
- line.clear();
- }
- line+=c;
- }
- fclose (stdout);
- fclose (stdin);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement