Files
DEV/DEV.1.1/CM2/CM2B/1.Décomposition.c

18 lines
336 B
C
Raw Normal View History

2024-12-09 14:58:52 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(int argc, char *argv[]) {
long int x, y;
ldiv_t result;
sscanf(argv[1], "%ld", &x);
sscanf(argv[2], "%ld", &y);
result = ldiv(x, y);
printf("quotient : %ld\n", result.quot);
printf("reste : %ld\n", result.rem);
return EXIT_SUCCESS;
}