【问题标题】:How to display the value of 64¹⁵ in C? [closed]如何在 C 中显示 64¹⁵ 的值? [关闭]
【发布时间】:2015-09-24 09:01:28
【问题描述】:

我想将 6415 的值赋给一个变量并显示出来。

注意我不想这样显示1.2379400392853803e+27。我想显示所有的数字。

【问题讨论】:

  • printf("%.0f\n", pow(64, 15));?
  • printf("%d\n",64^15);?
  • @squeamishossifrage, ^ 在 C 中是按位异或;)
  • @squeamishossifrage,64^15 适合双倍
  • @squeamishossifrage:OP 问题中没有提到整数类型

标签: c variables math io


【解决方案1】:

C/C++ 不支持这么大的整数。您必须求助于第三方库才能获得此类功能。例如:https://gmplib.org

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-09-16
    • 2018-04-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多