Advertisement
Guest User

Untitled

a guest
Oct 13th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3.  
  4. using namespace std;
  5.  
  6. int main() {
  7.  
  8. int a;
  9. int b;
  10.  
  11. cout << "a = ";
  12. cin >> a;
  13. cout << "b = ";
  14. cin >> b;
  15. cout << endl;
  16.  
  17. fstream fg("file.txt");
  18.  
  19. while ( fg >> a >> b ) {
  20.  
  21. fg << a << " " << b << endl;
  22.  
  23. }
  24.  
  25.  
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement