如何处理C / C ++中的大整数? [英] How to handle a large integer in C/C++?

查看:90
本文介绍了如何处理C / C ++中的大整数?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在下面执行此操作。

I need to perform this operation below.

cut = 400000000;
cut = cut * cut + 1;
printf("%d", cut);



如何处理这个大整数。

在此先感谢您的帮助。非常感谢您的帮助。



Sazzad


How can I handle this large integer.
Thanks in advance, your help is greatly appreciated.

Sazzad

推荐答案

int64_t变量可以保存您的结果。您还必须相应地修改printf格式说明符。
An int64_t variable can hold your result. You have also to modify the printf format specifier accordingly.


这篇关于如何处理C / C ++中的大整数?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆