Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <bits/stdc++.h>
- using namespace std;
- int main()
- {
- unsigned long long incorrect,power,correct;
- power = 7 * pow(10, 17); // 700000000000000000
- cout << "power " << power << "." << endl;
- correct = 42105263157894736 + power; // outputs 742105263157894736
- cout << "correct " << correct << "." << endl;
- incorrect = 42105263157894736 + (7 * pow(10, 17)); // outputs 742105263157894784
- //thisworks = 42105263157894736 + (7 * power);
- cout << "incorrect " << incorrect << "." << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement