fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, c;
  6. cout << "Enter two numbers: ";
  7. cin >> a >> b;
  8. c = a + b;
  9. cout << a << " + " << b << " = " << c << "\n";
  10. return 0;
  11. }
  12.  
Success #stdin #stdout 0.01s 5312KB
stdin
10
20
stdout
Enter two numbers: 10 + 20 = 30