Puntoinfinito

C++ Math's - Suma

Jul 26th, 2012
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.39 KB | None | 0 0
  1. #include <iostream>
  2. #include <stdio.h>
  3.  
  4. int add(int uno, int dos)
  5. {
  6. using std::cout;
  7. cout << "\Has indicado que quieres sumar " << uno << " y " << dos <<std::endl;
  8. cout << "\n\nY el resultado es : ";
  9. return (uno + dos);
  10. }
  11.  
  12. int main()
  13. {
  14. using namespace std;
  15. cout << "Indica los numeros que quieres sumar ";
  16. int a,b,c;
  17. cin >> a;
  18. cin >> b;
  19. c=add(a,b);
  20. cout << c;
  21. getchar();
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment