Advertisement
Guest User

Untitled

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