update
This commit is contained in:
17
DEV.1.1/CM2/CM2B/1.Décomposition.c
Normal file
17
DEV.1.1/CM2/CM2B/1.Décomposition.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#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;
|
||||
}
|
Reference in New Issue
Block a user