DEV/DEV1.1/Entrainements/controle_machine_2_B/decomposition.c
2024-12-10 12:52:05 +01:00

12 lines
306 B
C

# include <stdio.h>
# include <stdlib.h>
# include <math.h>
int main(int argc, char** argv) {
double partie_entiere;
modf(strtod(argv[1], NULL), &partie_entiere);
printf("partie entière : %f\npartie décimale : %f\n", partie_entiere, (strtod(argv[1],NULL) - partie_entiere));
return EXIT_SUCCESS;
}