0

I am working on an assignment, but realised an error (C++). For the below code, when I input n = 62, why will the number not be subtracted ?

long long int total = pow(2,n) - 1

How should I correctly represent the value ?

I found out that if I do:

long long int total = pow(2,n);
long long int final = total - 1

It works ? Why ?

0 Answers0