int max=(int)(((unsigned int)~0)>>1); int min=(int)((unsigned int)~max); printf("max=%d,min=%d\n",max,min); short maxs=(short)(((unsigned short)~0)>>1); short mins=(short)((unsigned short)~maxs); printf("maxs=%d,mins=%d\n",maxs,mins); char maxc=(char)(((unsigned char)~0)>>1); char minc=(char)((unsigned char)~maxc); printf("maxc=%d,minc=%d\n",maxc,minc);
compute the MAX and MIN of int
最新推荐文章于 2023-10-13 02:38:42 发布