#include <istream>
#include <ostream>
#include <iostream>		/// cout
#include <sstream>		/// istringstream
#include <locale>
#include <string>

using namespace std;


/// Copy a pair of values from an istream to an ostream.
void copy(istream& is, ostream& os)
{
    float area;
    double volume;

    while (is >> area >> volume)
        os << area << ' '
           << volume << '\n';

    os << endl;
}


void test(istream& fin, ostream& fout,
          istream& fin2, ostream& fout2)
{
   fin.imbue(locale {"en_US.UTF-8"});	/// American English
   fout.imbue(locale {"fr_FR.UTF-8"});	/// French

   /// read American English, write French
   copy(fin, fout);

   /// ...

   fin2.imbue(locale {"fr_FR.UTF-8"});	/// French
   fout2.imbue(locale {"en_US.UTF-8"});	/// American English

   /// read French, write American English
   copy(fin2, fout2);
}


int main()
{
   /// American English
   string AmerEng {"100.3 1000.3 34.55 345.45 968.83 9688.321"};
   istringstream issAmerEng {AmerEng};

   /// French
   string Frnch {"100,3 1000,3 34,55 345,45 968,83 9688,321"};
   istringstream issFrnch {Frnch};

   test(issAmerEng, cout,
        issFrnch, cout);
}