#include <iostream>
#include <cmath>
using namespace std;
int main()
{ int p[5], a, b, c;
//Input five integers in one line, with each integer separated by a space
cout << "Enter five integers separated by space: "<< endl;
for (int i=0; i<5; ++i)
{
cin>>p[i];
}
//Add the 1st and 2nd integers together and store the sum inside a variable
a=p[0]+p[1];
//Add the 3rd and 4th integers together and store the sum inside a variable.
b=p[2]+p[3];
//Multiply the two sums and raise the product result to the power of the 5th integer
c=pow((a*b), p[4]);
//Print out the result.
cout<<"The value is: "<<c<<endl;
return 0;
}
Comments
Leave a comment