#include<iostream>
      #include<math.h>
      using namespace std;
      int main() 
      {
          double base = 1.5;
          double expo1 = 2.5;
          double expo2 = -2.5;
          double res1, res2;
          // calculates the power
          res1 = pow(base, expo1);
          res2 = pow(base, expo2);
          cout << base << " ^ " << expo1 << " = " << res1 << endl;
          cout << base << " ^ " << expo2 << " = " << res2 << endl;
          return 0;
      }
      
      Cpp language logo

      power

      0

      0

      avatar
      Ayush Gupta

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.