Fin du TP12

This commit is contained in:
Simoes Lukas
2024-09-30 15:02:16 +02:00
parent bda03135c6
commit d674a59d0d
4 changed files with 394 additions and 0 deletions

13
DEV1.1/TP11/tests.c Normal file
View File

@@ -0,0 +1,13 @@
# 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;
}