Untitled
unknown
c_cpp
2 years ago
474 B
23
Indexable
Never
friend ostream& operator<<(ostream& out, const PhanSo& a); friend istream& operator>>(istream& in, PhanSo& a); ostream& operator<<(ostream& out, const PhanSo& a) { cout << "Tu so: " << a.TuSo << endl; cout << "Mau so: " << a.MauSo << endl; return out; } istream& operator>>(istream& in, PhanSo& a) { cout << "Moi ban nhap Tu so:" << endl; cin >> a.TuSo; cout << "Moi ban nhap vao Mau so:" << endl; do { in >> a.MauSo; } while (a.MauSo == 0); return in; }