标题:一个关于dev C++的问题
只看楼主
virusswb
Rank: 1
等 级:新手上路
威 望:1
帖 子:342
专家分:0
注 册:2005-8-6
得分:0 
#include <stdio.h>
#include <cstdlib>
#include <math.h>

int main ()
{
double x1=1, y1=5, x2=4, y2=7, side1, side2, distance;

side1 = x2 - x1;
side2 = y2 - y1;
distance = sqrt(side1*side1 + side2*side2);

printf("the distance between the two points is:""%5.2f \n", distance);
system("pause");
return 0;

}


jorden008@
2007-09-06 14:46



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-165361-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.018410 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved