一个关于结构复数的问题,为什么会得出错误答案。
#include<stdio.h>struct complex{
float x;
float y;
};
int main(void){
float real,imag;
struct complex co1,co2;
printf("put your co1real co1imag:");
scanf("%f5f",&co1.x,&co1.y);
printf("put your co2real co2imag:");
scanf("%f%f",&co2.x,&co2.y);
real=co1.x*co2.x-co1.y*co2.y;
printf("real is:%f/n",real);
imag=co1.x*co2.y+co1.y*co2.x;
printf("imag is:%fi/n",imag);
return 0;
}