这个代码哪里错了呢?
#include<iostream>
#include<cmath>
using namespace std;
int dis(int x1,int y1,int x2,int y2)
{
int dis;
dis=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
return dis;
}
int main()
{
int x1,x2,x3,y1,y2,y3;
float answer;
cin>>x1>>y1>>x2>>y2>>x3>>y3;
answer=(dis(x1,y1,x2,y2)+dis(x1,y1,x3,y3)+dis(x2,y2,x3,y3))*1.00;
cout<<answer;
return 0;
}
求大佬帮助