题目内容

求平面坐标上两点间的距离。(开平方根用函数sqrt),程序填空#include #include struct point{ double x; double y;};double dist(struct point p1,struct point p2){ return sqrt((p2.x-p1.x)*(p2.x-p1.x)+(p2.y-p1.y)*(p2.y-p1.y));}int main(){ struct point m,n; double dis; printf("请输入第一个点m的(x,y)坐标:"); scanf("%lf%lf", &m.x, &m.y); printf("请输入第二个点n的(x,y)坐标:"); scanf("%lf%lf",________, _________); dis=______________; printf("两点的距离为:%lf\d",dis);}

查看答案
更多问题

以下程序的输出结果是_________________#include #includestruct info{ int k;char *s; }t;void f(struct info t){ t.k=1997; t.s="Borland";}int main(){ t.k=2000; t.s="Inprise"; f(t); printf("%d%s\n",t.k,t.s);}

以下程序的输出结果为__________________#include struct st{int x,y;} data[2]={1,10,2,20};int main(){struct st *p=data;printf("%d",p->y);printf("%d",(++p)->x);return 0;}

#includestruct NODE{int num;struct NODE *next;};int main( ){struct NODE *p,*q,*r;p=(struct NODE *)malloc(sizeof(struct NODE));q=(struct NODE *)malloc(sizeof(struct NODE));r=(struct NODE *)malloc(sizeof(struct NODE));p->num=10; q->num=20; r->num=30;p->next=q;q->next=r;r->next=NULL;printf("%d",p->next->next->num);}

“南浦大桥的建成已成为上海又一重要的标志。她仿佛一把钥匙,打开上海与世界的大门;她仿佛一部史册,叙述着中国的未来;她仿佛一曲优美的交响乐,奏出时代的最强音……”这种修辞手法是( )

A. 拟人
B. 排比
C. 夸张
D. 双关

答案查题题库