Skip to content

Instantly share code, notes, and snippets.

@fernandoalv
Created April 17, 2015 20:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fernandoalv/095348c9dddf24a6de4f to your computer and use it in GitHub Desktop.
Save fernandoalv/095348c9dddf24a6de4f to your computer and use it in GitHub Desktop.
Pow
#include <iostream>
#include <cmath>
using namespace std;
long pot(long x,long y){
int z;
z=pow((x),y);
return z;
}
int main(){
long a,b,c;
cout<<"Dame el numero base"<<endl;
cin>>a;
cout<<"Dame la potencia"<<endl;
cin>>b;
c=pot(a,b);
cout<<c<<endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment