Answer:
#include <iostream>
#include <fstream>
#include <iomanip>
using namespace std;
int main(){
string name;
double weightKg, weightPd;
cout<< fixed << setprecision(2);
fstream myFile("filename.txt");
while (getline( myFlie, name, weightPd)){
weightKg = weight * 0.453592;
cout<< name << weightPd <<weightKg;
}
myFile.close();
}
Step-by-step explanation:
The C++ source code reads in the content of a file that has a name and weight value in pounds and outputs the name, weight in pounds and the weight in kilograms.