fork download
  1. #include <iostream>
  2. #include <boost/multiprecision/cpp_int.hpp>
  3.  
  4. using namespace std;
  5. using namespace boost::multiprecision;
  6.  
  7. int main() {
  8. cpp_int num1, num2;
  9.  
  10. cout << "Enter a large integer: ";
  11. cin >> num1;
  12.  
  13. cout << "Enter another large integer: ";
  14. cin >> num2;
  15.  
  16. cpp_int sum = num1 + num2;
  17. cpp_int product = num1 * num2;
  18.  
  19. cout << "Sum: " << sum << endl;
  20. cout << "Product: " << product << endl;
  21.  
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 5284KB
stdin
100
200
stdout
Enter a large integer: Enter another large integer: Sum: 300
Product: 20000