fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. float x = 2;
  7. float y = 3;
  8. float z = 5;
  9. std::cout << "pow(x,2) = " << std::pow(x,2) << " x * x = " << (x * x) << std::endl;
  10. std::cout << "pow(y,2) = " << std::pow(y,2) << " y * y = " << (y * y) << std::endl;
  11. std::cout << "pow(z,2) = " << std::pow(z,2) << " x * x = " << (z * z) << std::endl;
  12. // your code goes here
  13. return 0;
  14. }
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
pow(x,2) = 4  x * x = 4
pow(y,2) = 9  y * y = 9
pow(z,2) = 25  x * x = 25