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

 

相关文章:

  • 2022-12-23
  • 2021-06-21
  • 2022-12-23
  • 2021-10-23
  • 2022-12-23
  • 2021-12-05
猜你喜欢
  • 2022-12-23
  • 2021-09-21
  • 2021-12-29
  • 2022-12-23
  • 2021-06-23
  • 2021-11-13
相关资源
相似解决方案