13 lines
347 B
C
13 lines
347 B
C
# include <stdio.h>
|
|
# include <stdlib.h>
|
|
# include <math.h>
|
|
# define M_PI 3.14159265358979323846264338379
|
|
|
|
int main(void) {
|
|
double reel;
|
|
printf("Entrez un réel : ");
|
|
scanf("%lf", &reel);
|
|
printf("chiffre des unités : %d\n", (int) floor(reel) % 10);
|
|
printf("chiffre des dixièmes : %d\n", (int) floor(reel * 10) % 10);
|
|
return EXIT_SUCCESS;
|
|
} |