// Concentration of orange juice
#include <iostream>
using namespace std;

struct Evaporator {
  double imf, isc; // inlet  mass flow and concentration
  double omf, osc; // outlet mass flow and concentration
  double owf;      // outlet evaporated water flow
};

// Function returning evaporator solutions
Evaporator Solver(double L,    // inlet  mass flow
                  double s1,   // inlet  solid fraction
                  double s2) { // outlet solid fraction
  Evaporator x;
  x.imf = L;
  x.isc = s1/100;
  x.osc = s2/100;
  x.omf = L * (s1/100) / (s2/100);
  x.owf = L - x.omf;
  return x;
}

int main(){

  double imass, icon, ocon;
  cout << "Input initial mass flow (kg/h): ";
  cin  >> imass;
  cout << "Input initial concentration(%): ";
  cin  >> icon;
  cout << "Input desired concentration(%): ";
  cin  >> ocon;

  Evaporator j = Solver(imass, icon, ocon);

  cout << "Evaporated water flow   (kg/h): "<< j.owf <<endl;
  cout << "Final concentrated juice(kg/h): "<< j.omf <<endl;
}
