#include #include #include using namespace std; class SP1 { protected: float a,b; public: SP1(float da=0, float db=0) { a=da; b=db; } ~SP1() { } void Nhap() { cout<<"Nhap phan thuc: ";cin>>a; cout<<"Nhap phan ao: ";cin>>b; } void Xuat() { cout<=0) cout<<"+"<>(istream &is, SP2 &sp) { cout<<"Nhap phan thuc: ";is>>sp.a; cout<<"Nhap phan ao: ";is>>sp.b; return is; } friend ostream& operator<<(ostream &os, SP2 sp) { os<=0) os<<"+"<>sp1; cout<<"\n\nNhap so phuc thu 2\n\n";cin>>sp2; hieu = sp1.tinhhieu(sp2); tich = sp1.tinhtich(sp2); cout<<"\n\nHieu 2 so phuc la: "; cout<