中点坐标

/*
 *copvriqht(c)2016,烟台大学计算机学院
 *All rights reserved.
 *文件名称:test.cpp
 *作者:陈传祯
 *完成日期:2016年4月1日
 *版本号:v1.0
 *
 *问题描述
 *输入描述
 *程序输出

*/

#include"stdio.h"

struct Student
{
int heng;
int zong;
}aaa[2];
int main()
{
for(int i=0;i<2;i++)
{
        scanf("%d",&aaa[i].heng);
scanf("%d",&aaa[i].zong);
}
double heng1,zong1;
heng1=(aaa[0].heng+aaa[1].heng)/2.0;
zong1=(aaa[0].zong+aaa[1].zong)/2.0;
printf("%0.1f %0.1f\n",heng1,zong1);
return 0;
}

你可能感兴趣的:(中点坐标)