#include #include #include using namespace std; int main() { ifstream in; in.open("elements.txt"); if (in.fail()) { cout << "Could not open the file\n"; exit(1); } while (true) { string symbol, name; double atwt; in >> symbol >> name >> atwt; if (in.fail()) break; cout << "Symbol: " << symbol << ", Name: " << name << ", Atwt = " << atwt << "\n"; } in.close(); }