12 lines
306 B
C
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;
|
|
}
|
|
|