18 lines
318 B
C
Executable File
18 lines
318 B
C
Executable File
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <assert.h>
|
|
#include <math.h>
|
|
|
|
int main(int argc, char* argv[])
|
|
{
|
|
/// Syntaxe ./argv[0] x n
|
|
/// Resultat sur stdout : x^n
|
|
assert (argc == 3);
|
|
int x = atoi (argv[1]);
|
|
int n = atoi (argv[2]);
|
|
|
|
printf ("%.0f\n",pow (x, n));
|
|
return 0;
|
|
}
|
|
|