No older revisions available
No older revisions available
~cpp
#include <iostream>
#include <stdlib.h>
using namespace std;
int power(int a, int b);
int main(int argc, char *argv[])
{
int result1,result2;
result1 = atoi(argv[1]);
result2 = atoi(argv[2]);
power(result1, result2);
// cout << power(result1, result2);
return 0;
}
int power(int a, int b)
{
for(int i=0; i<b ; i++)
{
a*=a;
}
return a;
}
/*
int main()
{
int result;
char a[]="12213131";
result = atoi(a);
printf("%d\n", result);
return 0;
}
*/