DEV/BUT1/DEV1.1/CM2_2/CM2/exo1.c

13 lines
354 B
C
Raw Normal View History

2024-02-01 13:55:03 +01:00
#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;
}