update
This commit is contained in:
BIN
DEV/DEV1.1/TP_Reels/exe
Executable file
BIN
DEV/DEV1.1/TP_Reels/exe
Executable file
Binary file not shown.
BIN
DEV/DEV1.1/TP_Reels/executable
Executable file
BIN
DEV/DEV1.1/TP_Reels/executable
Executable file
Binary file not shown.
4
DEV/DEV1.1/TP_Reels/programme.c~
Normal file
4
DEV/DEV1.1/TP_Reels/programme.c~
Normal file
@@ -0,0 +1,4 @@
|
||||
int main(void) {
|
||||
printf("%f\n", 12345.678910111213);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
6
DEV/DEV1.1/TP_Reels/programme1.c
Normal file
6
DEV/DEV1.1/TP_Reels/programme1.c
Normal file
@@ -0,0 +1,6 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
int main(void) {
|
||||
printf("%.12f\n", 12345.678910111213);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
11
DEV/DEV1.1/TP_Reels/programme2.c
Normal file
11
DEV/DEV1.1/TP_Reels/programme2.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
printf("%f\n", 5.0+2.5);
|
||||
printf("%f\n", 5.0-2.5);
|
||||
printf("%f\n", 5.0*2.5);
|
||||
printf("%f\n", 5.0/2.5);
|
||||
printf("%f\n", 5%2);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
8
DEV/DEV1.1/TP_Reels/programme2.c~
Normal file
8
DEV/DEV1.1/TP_Reels/programme2.c~
Normal file
@@ -0,0 +1,8 @@
|
||||
int main(void) {
|
||||
printf("%f\n", 5.0+2.5);
|
||||
printf("%f\n", 5.0-2.5);
|
||||
printf("%f\n", 5.0*2.5);
|
||||
printf("%f\n", 5.0/2.5);
|
||||
printf("%f\n", 5.0%2);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
9
DEV/DEV1.1/TP_Reels/programme3.c
Normal file
9
DEV/DEV1.1/TP_Reels/programme3.c
Normal file
@@ -0,0 +1,9 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
printf("%f\n", +1.0/0.0);
|
||||
printf("%f\n", -1.0/0.0);
|
||||
printf("%f\n", -0.0/0.0);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
0
DEV/DEV1.1/TP_Reels/programme3.c~
Normal file
0
DEV/DEV1.1/TP_Reels/programme3.c~
Normal file
16
DEV/DEV1.1/TP_Reels/programme4.c
Normal file
16
DEV/DEV1.1/TP_Reels/programme4.c
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
int reel;
|
||||
double reelTransforme;
|
||||
char caractere;
|
||||
printf("Saisissez un réel : ");
|
||||
reel = scanf("%lf", &reelTransforme);
|
||||
printf("Abracadabra ! Voici sa notation en écriture scientifique : " "%e\n", reelTransforme);
|
||||
printf("Saisissez maintenant un caractère : ");
|
||||
caractere = getchar();
|
||||
caractere = getchar();
|
||||
printf("Et hop ! Le je vous le rends en 5 exemplaire : " "%c\n", caractere + caractere);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
10
DEV/DEV1.1/TP_Reels/programme4.c~
Normal file
10
DEV/DEV1.1/TP_Reels/programme4.c~
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
int n;
|
||||
printf("Saisissez un réel : %c\n");
|
||||
n = scanf("%lf", &x)
|
||||
printf("son carré vaut : %f\n", x*x);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
19
DEV/DEV1.1/TP_Reels/programme5.c
Normal file
19
DEV/DEV1.1/TP_Reels/programme5.c
Normal file
@@ -0,0 +1,19 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
double argent;
|
||||
int anneeInitial=2022;
|
||||
int temps=10;
|
||||
int annee=anneeInitial;
|
||||
printf("Combien Voulez vous me donner : ");
|
||||
scanf("%lf", &argent);
|
||||
while(annee < (anneeInitial+temps)) {
|
||||
printf("%d",annee);
|
||||
printf("%c" " --> ");
|
||||
printf("%.2f\n",argent);
|
||||
annee = annee + 1;
|
||||
argent = argent*1.04;
|
||||
}
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
0
DEV/DEV1.1/TP_Reels/programme5.c~
Normal file
0
DEV/DEV1.1/TP_Reels/programme5.c~
Normal file
15
DEV/DEV1.1/TP_Reels/programme6.c
Normal file
15
DEV/DEV1.1/TP_Reels/programme6.c
Normal file
@@ -0,0 +1,15 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int main(void) {
|
||||
int nb=5;
|
||||
int resultat=0;
|
||||
while(nb > 0) {
|
||||
printf("%d", nb);
|
||||
nb -= 1;
|
||||
printf("Donnez moi un chiffre : ");
|
||||
resultat = resultat + scanf("%lf\n", &resultat);
|
||||
printf("%d", resultat);
|
||||
}
|
||||
printf("%d", resultat);
|
||||
}
|
||||
0
DEV/DEV1.1/TP_Reels/programme6.c~
Normal file
0
DEV/DEV1.1/TP_Reels/programme6.c~
Normal file
9
DEV/DEV1.1/TP_Reels/reponse.txt
Normal file
9
DEV/DEV1.1/TP_Reels/reponse.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
printf("%f\n", 12345.678910111213);
|
||||
printf("%.12f\n", 12345.678910111213);
|
||||
printf("%.15f\n", 12345.678910111213);
|
||||
les résultat devienne aproximatif à cette échelle. il n'y a pas autant de chiffre après la virgule que ce que l'on souhaite
|
||||
|
||||
l'opération % ne s'effectue qu'avec des entiers
|
||||
|
||||
en c, on obtient la valeur vers laquelle tendent les résultats (infini)
|
||||
|
||||
0
DEV/DEV1.1/TP_Reels/reponse.txt~
Normal file
0
DEV/DEV1.1/TP_Reels/reponse.txt~
Normal file
Reference in New Issue
Block a user