Cho em hoi bai này e sai ở đâu ak
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <string>
#include <iomanip>
using namespace std;
class NhanVien
{
private:
string MaNV, HoTen, DiaChi;
int Nam;
int LuongCB = 2;
float HeSoLuong;
float PhuCap;
string PhongBan;
float TongLuong;
public:
NhanVien(void);
~NhanVien(void);
void NhapThongTin();
void hienThi();
};
int main()
{
NhanVien t;
t.NhapThongTin();
t.hienThi();
cout << endl;
return 0;
}
NhanVien::NhanVien()
{
}
NhanVien::~NhanVien()
{
}
void NhanVien::NhapThongTin()
{
cout << "\n Ma Nhan Vien cua ban: ";
getline(cin, MaNV);
cin.ignore();
cout << "\n Nhap Ho ten cua ban: ";
getline(cin, HoTen);
cin.ignore();
cout << "\n Dia chi cua ban: ";
getline(cin, DiaChi);
cout << "\n Thoi gian vao cong ty: ";
cin >> Nam;
cin.ignore();
cout << "\n\t====BANG LUONG====";
cout << "\n Bac 1 2 3 4 5 6"
<< "\n HeSo 1.5 2.0 2.8 3.2 4.0 5.0";
do
{
cout << "\n He so luong cua ban: ";
cin >> HeSoLuong;
cout << "\n Phu cap cua ban: ";
cin >> PhuCap;
if (PhuCap < 0)
{
cout << "\n Ban da nhap sai phu cap"
<< "\n Moi nhap lai!";
}
if (HeSoLuong =! (1.5, 2.0, 2.8, 3.2, 4.0, 5.0))
{
cout << "\n Ban da nhap sai he so luong"
<< "\n Moi nhap lai!";
};
} while ( HeSoLuong =! (1.5, 2.0, 2.8, 3.2, 4.0, 5.0)||PhuCap < 0);
cout << "\n Phong ban cua ban la: ";
getline(cin, PhongBan);
cin.ignore();
float TongLuong = HeSoLuong*LuongCB + PhuCap;
}
void NhanVien::hienThi()
{
cout << setw(6) << MaNV
<< setw(30) << HoTen
<< setw(30) << DiaChi;
cout << setw(6) << PhongBan;
cout << setw(15) << TongLuong<<" Trieu Dong";
}