Advertisement
Mike_be

Xyi

Nov 7th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.49 KB | None | 0 0
  1. #include "stdafx.h"
  2. #include <string>
  3. #include <vector>
  4. #include <fstream>
  5. #include <sstream>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11.     string input = "", output = "";
  12.     ifstream read;
  13.     read.open("input.txt");
  14.     getline(read, input);
  15.     read.close();
  16.     istringstream iss(input);
  17.     while (iss)
  18.     {
  19.         string temp;
  20.         iss >> temp;
  21.         output += temp + "*";
  22.     }
  23.     ofstream write;
  24.     output.pop_back();
  25.     output.pop_back();
  26.     write.open("output.txt");
  27.     write << output;
  28.     write.close();
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement