#include<bits/stdc++.h>
using namespace std;
#define fi first
#define se second
#define pb push_back
#define ll long long
#define fast() ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL);
struct NhanVien{
string ma,ten;
float hsluong,luongcb,phucap;
};
void nhap(vector<NhanVien> ds,const string& file){
ofstream fileOut(file);
if(fileOut.is_open()){
for(auto it : ds){
fileOut << it.ma << "\n";
fileOut << it.ten << "\n";
fileOut << it.hsluong << "\n";
fileOut << it.luongcb << "\n";
fileOut << it.phucap << "\n";
}
fileOut.close();
}
}
void doc(vector<NhanVien> &ds,const string &file){
ifstream fileIn(file);
if(fileIn.is_open()){
NhanVien nv;
while(fileIn >> nv.ma){
fileIn.ignore();
getline(fileIn,nv.ten);
fileIn >> nv.hsluong >> nv.luongcb >> nv.phucap;
ds.pb(nv);
}
fileIn.close();
}
}
void solve(vector<NhanVien> &ds, const string& file){
for(auto nv : ds){
float tongluong = nv.luongcb * nv.hsluong + nv.phucap;
cout << nv.ma << " " << nv.ten << " " << tongluong << "\n";
}
}
int main(){
fast();
vector<NhanVien> ds;
string file = "nhanvien.txt";
for(int i = 0 ; i < 10 ; i++){
NhanVien nv;
cin >> nv.ma;
cin.ignore();
getline(cin,nv.ten);
cin >> nv.hsluong >> nv.luongcb >> nv.phucap;
ds.pb(nv);
}
nhap(ds,file);
ds.clear();
doc(ds,file);
solve(ds,file);
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKI2RlZmluZSBmaSBmaXJzdAojZGVmaW5lIHNlIHNlY29uZAojZGVmaW5lIHBiIHB1c2hfYmFjawojZGVmaW5lIGxsIGxvbmcgbG9uZwojZGVmaW5lIGZhc3QoKSBpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKDApOyBjaW4udGllKE5VTEwpOyBjb3V0LnRpZShOVUxMKTsKCnN0cnVjdCBOaGFuVmllbnsKCXN0cmluZyBtYSx0ZW47CglmbG9hdCBoc2x1b25nLGx1b25nY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