E D R , A S I H C RSS

제곱연산자 전달인자로 (Setting)

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;
}
*/
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2021-02-07 05:31:04
Processing time 0.0168 sec