70,023
社区成员




typedef unsigned int ui;
int main()
{
ui ip = 0;
ui a =0,b = 0,c =0,d =0;
scanf("%d.%d.%d.%d",&a,&b,&c,&d);
printf("\n%d.%d.%d.%d\n", a, b, c, d);
ip = a<<24+b<<16+c<<8+d;
printf("\nThe int IP is:%d\n",ip);
system("pause");
return 0;
}
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
typedef unsigned int ui;
int main()
{
ui ip = 0;
ui a =0,b = 0,c =0,d =0;
scanf("%d%d%d%d",&a,&b,&c,&d);
printf("\n%d.%d.%d.%d\n", a, b, c, d);
ip = a*pow(2,24)+b*pow(2,16)+c*pow(2,8)+d;
printf("\nThe int IP is:%d\n",ip);
system("pause");
return 0;
}