fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. float Add(int a, int b) {
  5. return a + b;
  6. }
  7. int main()
  8. {
  9. float x, y;
  10. cout << "Enter the 1st element: ";
  11. cin >> x;
  12. cout << "Enter the 2nd element: ";
  13. cin >> y;
  14.  
  15. cout << "The summation is: " << Add(x, y) << endl;
  16. }
Success #stdin #stdout 0.01s 5320KB
stdin
Standard input is empty
stdout
Enter the 1st element: Enter the 2nd element: The summation is: 0