/************************************
Write a program that reads in a file
(name given by user) that contains points
in ordered pair notation, and writes the
same points to a file (name also given by
user) in gnuplot notation, i.e. one point
per line, each point given by x-coordinate
tab ('\t') y-coordinate.
************************************/
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
// Read input and output file names
string inname, outname;
cout << "Input file name: ";
cin >> inname;
cout << "Output file name: ";
cin >> outname;
// Open up input and output files
ifstream fin(inname);
ofstream fout(outname);
// loop over each point & convert
char c;
double x, y;
while(fin >> c >> x >> c >> y >> c)
fout << x << '\t' << y << endl;
return 0;
}