I've been trying to find a way to store the result of this arithmetic for hours now.
I understand that the data is too large to be stored. But the largest data type my compiler seems to support is unsigned long long.
#include <iostream>
#include <iomanip>
#include <limits>
using namespace std;
int main() {
int num1 = 100000;
int num2 = 200000;
int num3 = 300000;
double num4 = 500000.00;
unsigned long long product = (num1 * num2 * num3 * num4);
cout << fixed << setprecision(3) << product << endl;
// Answer should be 3000000000000000000000.000
// Result is 18446447556077551616
return 0;
}