Advertisement
Lorfa

wtfc

Apr 4th, 2021
912
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.56 KB | None | 0 0
  1. #include <iostream>
  2. #include <bits/stdc++.h>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     unsigned long long incorrect,power,correct;    
  8.        
  9.     power = 7 * pow(10, 17); // 700000000000000000
  10.    
  11.     cout << "power     " << power << "." << endl;
  12.    
  13.     correct = 42105263157894736 + power; // outputs 742105263157894736
  14.    
  15.     cout << "correct   " << correct << "." << endl;
  16.    
  17.     incorrect = 42105263157894736 + (7 * pow(10, 17)); // outputs 742105263157894784
  18.    
  19.     //thisworks = 42105263157894736 + (7 * power)
  20.  
  21.     cout << "incorrect " << incorrect << "." << endl;
  22.  
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement