#include<stdio.h>
struct xl
{
float x;
float y;
}xl1,xl2;
main()
{
struct xl xl1,xl2;
scanf("%f",&xl1.x);
scanf("%f",&xl1.y);
scanf("%f",&xl2.x);
scanf("%f",&xl2.y);
float x3,y3;
x3=xl1.x+xl2.x;
y3=xl1.y+xl2.y;
printf("(%.1f,%.1f)",x3,y3);
return 0;
}
我用的也是codeblocks,这个也是可以编译的。木得问题。
struct xl
{
float x;
float y;
}xl1,xl2;
main()
{
struct xl xl1,xl2;
scanf("%f",&xl1.x);
scanf("%f",&xl1.y);
scanf("%f",&xl2.x);
scanf("%f",&xl2.y);
float x3,y3;
x3=xl1.x+xl2.x;
y3=xl1.y+xl2.y;
printf("(%.1f,%.1f)",x3,y3);
return 0;
}
我用的也是codeblocks,这个也是可以编译的。木得问题。