Advertisement
Semior001

Need fflush(stdin)

Oct 1st, 2016
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main(){
  5.     string s;
  6.     int n;
  7.     scanf("%d", &n);
  8.     fflush(stdin);
  9.     for(int i = 0; i < n; i++){
  10.         getline(cin, s);
  11.         cout << s << endl;
  12.     }
  13.     return 0;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement