15 lines
340 B
C
15 lines
340 B
C
|
#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;
|
||
|
}
|