#include <cstdlib>
#include <iostream>

using namespace std;

int pangkat(int a, int n){
int k, hasil;


hasil=1;
for(k=1;k<=n;k++){
hasil=hasil*a;
}
return hasil;
}

int main(int argc, char *argv[])
{
int x,y;

cout<<"Masukkan angka : ";
cin>>x;
cout<<endl;
cout<<"Masukkan pangkat : ";
cin>>y;
cout<<endl;
cout<<"Hasil : "<<pangkat(x,y);
cout<<endl;
cout<<endl;

system("PAUSE");
return EXIT_SUCCESS;
}

Leave a Reply

Subscribe to Posts | Subscribe to Comments

Popular Post

- Copyright © Irhaz Share -Irhaz Matru- Powered by Blogger - Design by Irhaz Rangga Kala -