fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int a, b, c; // Declare variables
  7.  
  8. // Prompt user to enter two numbers
  9. cout << "Enter two numbers: ";
  10.  
  11. // Read input from the console
  12. cin >> a >> b;
  13.  
  14. // Calculate sum
  15. c = a + b;
  16.  
  17. // Display result
  18. cout << a << " + " << b << " = " << c << "\n";
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0.01s 5312KB
stdin
Standard input is empty
stdout
Enter two numbers: 2042196640 + 22059 = 2042218699