如何用c++语言求一段线段长度

来源:百度知道 编辑:UC知道 时间:2024/07/08 02:31:25

# include <iostream>
# include <math>
using namespace std;
int main(){
int x,y;
cin >>x >>y
cout <<sqrt(x*x+y*y);
getchar(); \\保留窗口
getchar();
return 0;
}

main()
{ int string;
scanf("Give me string:%d",string);
printf("Long of string is:%d",string);
}