scanf("%f\n", &z1.real);
Get rid of all those \n parts, they don't belong.
Type: Posts; User: hk_mp5kpdw
scanf("%f\n", &z1.real);
Get rid of all those \n parts, they don't belong.
A return statement can only return a single value, a complex number is represented by two values. In order to return a complex number as a single value, you would need to wrap up the two components...