Files
M311-Principes-des-systemes…/2019-2020/S3T_TP_04_PROCESSUS-3-SGF-2/POPEN_sources/m311_puiss.c
JunkJumper cf00c53e65 "debut TD0"
2020-09-04 10:27:13 +02:00

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;
}