Developpement/23DEV1.1/CM2/Section.c

15 lines
340 B
C
Raw Permalink Normal View History

2024-12-09 11:53:11 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char const *argv[])
{
long dividende, diviseur;
ldiv_t q;
dividende = strtol(argv[1],NULL,10);
diviseur = strtol(argv[2],NULL,10);
q = ldiv(dividende, diviseur);
printf("Quotient : %lo\n", q.quot);
printf("Reste : %lo\n", q.rem);
return EXIT_SUCCESS;
}