#include "stdafx.h"
#include "conio.h"
#include "iostream"
#include "stdio.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int b,e,p; /////////b is base,e is exponent, p is power
int n;
cout<<"enter b : ";
cin>>b;
cout<<"enter e : ";
cin>>e;
p=1;
for(n=1;n<=e;n++)
p=p*b;
cout<<"Answer = "<<p;
getch();
}
0 comments :
Post a Comment