Advertisement
Guest User

Untitled

a guest
Jul 4th, 2015
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3. #include <fstream>
  4. #include <string>
  5. #include <cmath>
  6. using namespace std;
  7. int main(){
  8. ifstream file("zad_1.txt");
  9. string data = "";
  10. for(int i = 0; i < 5 * 2; i++){
  11. string s = "";
  12. file >> s;
  13. data.append(s);
  14. data.append(" ");
  15. if( i % 2 ){
  16. data.append("\n");
  17. }
  18. }
  19.  
  20. cout << data;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement