/*求两点距离*/
#include<iostream>
#include<cmath>using namespace std;
int main()
{
double x1,x2,y1,y2,l;
cout<<"请输入第一个点的坐标:";
cin>>x1>>y1;
cout<<"请输入第二个点的坐标:";
cin>>x2>>y2;
l=sqrt((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2));
cout<<"两点的距离为:"<<l;
return 0;
}
/*字母简单加密*/
#include<iostream>
using namespace std;
int main()
{
char sum;
cout<<"输入任意字母";
cin>>sum;
if (sum>='A' && sum<='V' || sum>='a' && sum<='v')
sum+=4,cout<<sum;
else if (sum>='W' && sum<='Z' || sum>='w' && sum<='z')
sum-=22,cout<<sum;
else
cout<<"输入有误"<<endl;
return 0;
}