0

How can i print 100 digits number in c++

100 digits number

8th Jul 2018, 10:52 AM
LetterC67
LetterC67 - avatar
5 ответов
8th Jul 2018, 12:06 PM
hinanawi
hinanawi - avatar
+ 1
Do you want to print 100 different numbers? Or a hundred digit long number?
8th Jul 2018, 10:55 AM
Vedant Bang
Vedant Bang - avatar
+ 1
In the former case, just use a loop. In the latter case, it depends if you also want to store the number or just print it. For printing again a loop and maybe string conversion would already be enough.
8th Jul 2018, 11:31 AM
Matthias
Matthias - avatar
+ 1
i want to print a long number like 2^100 but unsigned long long only contains at least the [0, +18,446,744,073,709,551,615] range😭😢
8th Jul 2018, 11:47 AM
LetterC67
LetterC67 - avatar
+ 1
You could split the number into an array, then print the array index by index.
8th Jul 2018, 11:48 AM
Ben Allen (Njinx)
Ben Allen (Njinx) - avatar