Write a C++ Program to raise any number X to power N

Today we make a  Program To C++ Program to raise any number x to a positive power n.i’m using Dev c++.Now Try To Make it.

C++ Program to raise any number x to a positive power n

#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
int x,n,result=1;
cout << "Enter Number \"n\": ";
cin >> n;
cout << "\nEnter Power to Raise \"x\": ";
cin >> x;
if(x > 0)
{
for(int i=0;i<=x;i++)
result=x*n;
cout << "n Power x = " << result;
}
else
{
cout << "x must be a positive number";
}
getch();
return 0;
}