int数据类型的最大数

 1 /* 32位系统 */
 2 #include <stdio.h>
 3 
 4 int main()
 5 {
 6     int a = 0, b = 0;
 7     while (++a>0)
 8     {
 9         ;
10     }
11     printf("int数据类型最大数是:%d\n", a - 1);
12 
13     int n = a - 1;
14     do
15     {
16         n = n / 10;
17         b++;
18     } while (n > 0);
19     printf("int数据类型最大数共有%d位。\n", b);
20     
21     return 0;
22 }

转载于:https://www.cnblogs.com/2018jason/p/11022976.html

猜你喜欢

转载自blog.csdn.net/weixin_34337381/article/details/93227116