13 lines
354 B
C
13 lines
354 B
C
|
#include <stdlib.h>
|
||
|
#include <stdio.h>
|
||
|
|
||
|
int main(int argc, char* argv[]){ /* ou "char**"" */
|
||
|
long numerateur = strtol(argv[1],NULL,10);
|
||
|
long denominateur = strtol(argv[2],NULL,10);
|
||
|
ldiv_t calcul = ldiv(numerateur,denominateur);
|
||
|
|
||
|
printf("quotient : %d\n",calcul.quot);
|
||
|
printf("reste : %d\n",calcul.rem);
|
||
|
|
||
|
return EXIT_SUCCESS;
|
||
|
}
|