Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I need to perform this operation below.
C++
cut = 400000000;
cut = cut * cut + 1;
printf("%d", cut);

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

Sazzad
Posted

1 solution

An int64_t variable can hold your result. You have also to modify the printf format specifier accordingly.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 5-Nov-14 13:27pm    
5ed. :-)
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900