fork download
  1. #include <iostream>
  2. #include <cmath> // Để dùng hàm pow
  3. using namespace std;
  4.  
  5. int main() {
  6. double a, b;
  7. cout << "Enter two real numbers: ";
  8. cin >> a >> b;
  9.  
  10. double result = pow(a, 3) + pow(b, 3);
  11. cout << "The sum of a^3 + b^3 is: " << result << endl;
  12.  
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5328KB
stdin
Standard input is empty
stdout
Enter two real numbers: The sum of a^3 + b^3 is: 0