This commit is contained in:
2023-10-23 13:23:36 +02:00
parent 667dae6f1a
commit 322b22f9bf
5711 changed files with 72953 additions and 0 deletions

BIN
DEV/DEV1.1/TP_Reels/exe Executable file

Binary file not shown.

BIN
DEV/DEV1.1/TP_Reels/executable Executable file

Binary file not shown.

View File

@@ -0,0 +1,4 @@
int main(void) {
printf("%f\n", 12345.678910111213);
return EXIT_SUCCESS;
}

View File

@@ -0,0 +1,6 @@
#include <stdio.h>
#include <stdlib.h>
int main(void) {
printf("%.12f\n", 12345.678910111213);
return EXIT_SUCCESS;
}

View 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;
}

View 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;
}

View 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;
}

View File

View 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;
}

View 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;
}

View 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;
}

View File

View 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);
}

View File

View 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)

View File