Hi mọi người, em mới học c++, xem giúp em code này có lỗi j không ạ. sao nó không chạy!
#include <math.h>
#include <stdio.h>
using namespace std;
struct Complex
{
float Re;
float Im;
} Complex;
Complex Add(Complex a, Complex b)
{
Complex c;
c.Re = a.Re + b.Re;
c.Im = a.Im + b.Im;
return c;
};
int main() {
Complex a, b, c;
cout<<"nhap phan thuc mot";
cin>>a.Re;
cout<<"nhap phan ao mot";
cin>>a.Im;
cout<<"nhap phan thuc hai";
cin>>b.Re;
cout<<"nhap phan ao hai";
cin>>b.Im;
c= Add(a,b);
return 0;
}