// IP地址转换.cpp
#include "iostream"
#include "windows.h"
using namespace std;
int main()
{
int i=0,j;
long r=0;
int x=0,y=0;
int a[1000];
cin>>r;
while(r!=0)
{
a[i]=r%16;
r=r/16;
i++;
}
for(j=i-1;j>=0;j--)
{
if(j%2==1)
x=a[j]*16;
else if(j%2==0&&j!=0)
{
y=a[j]*1;
y=x+y;
cout<<y<<".";
}
else
{
y=a[j]*1;
y=x+y;
cout<<y;
}
}
cout<<'\n';
system("pause");
return 0;
}
//我想输入一个十进制数,然后把它变成16进制,最后以ip地址的形式数出来。
但在这里我一旦输入10位数,它就没用了。