fork download
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int x , y;
  9. cout << "enter number 1 ";
  10. cin >> x;
  11. cout << "enter number 2 ";
  12. cin >> y;
  13. cout << "number 1 multiplied by number 2 is:" << endl;
  14. cout << x * y << endl;
  15. cout << "number 1 minus number 2 is:" << endl;
  16. cout << x - y << endl;
  17. cout << "number 1 plus number 2 is:" << endl;
  18. cout << x + y << endl;
  19. cout << "number 1 divided by number 2 is:" << endl;
  20. cout << x / y << endl;
  21. cout << "number 1 to the power of number 2 is:" << endl;
  22. cout << pow(x , y) << endl;
  23. cout << "number 1 squared is:" << endl;
  24. cout << x * x << endl;
  25. cout << "number 2 squared is:" << endl;
  26. cout << y * y << endl;
  27.  
  28. return 0;
  29. }
  30.  
Success #stdin #stdout 0s 5292KB
stdin
Standard input is empty
stdout
enter number 1 enter number 2 number 1 multiplied by number 2 is:
254587856
number 1 minus number 2 is:
-1762997199
number 1 plus number 2 is:
-1762931665
number 1 divided by number 2 is:
-53803
number 1 to the power of number 2 is:
-inf
number 1 squared is:
919374080
number 2 squared is:
1073676289