Raising a number to power n means multiplying the number p times.Write a program to find the power of both double and integer type using function overloading.Input:First line contains float value and its power Second line contains integer value and its power. Test Case 1 Input (stdin) 5.025 2 2 2 Expected Output 25.2506 4 Test Case 2 Input (stdin) 6.254 3 3 4 Expected Output 244.61 81
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float a,e;
int b,c,d,f;
cin>>a>>b>>c>>d;
e=(pow(a,b));
f=(pow(c,d));
cout<<e<<endl<<f;
return 0;
}