//programmin by A. Najafzadeh - Tuesday,
March 07, 2006
#include <iostream.h>
#include <conio.h>
class power{
int a , b;
double c;
public:
void input1();
void calc1();
void show1();
};
void power::input1()
{
cin>>a>>b;
}
void power::calc1()
{
c
= 1;
for(int i = 1; i <= b; i++)
c *= a;
}
void power::show1()
{
cout<<c;
}
main()
{
power ff;
ff.input1();
ff.calc1();
ff.show1();
getch();
}
//programmin by A. Najafzadeh -
Tuesday, March 07, 2006
|