nouveau
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
/*EXO 1*/
|
||||
|
||||
int main(void) {
|
||||
int n;
|
||||
double x;
|
||||
char v;
|
||||
printf("Saisir un réel");
|
||||
n = scanf("%lf\n",&x);
|
||||
printf("Sa forme scientifque : %e\n",n),
|
||||
v = getchar();
|
||||
printf("5 fois de suites ; %c,%c,%c,%c,%c",v);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
0
DEV1.1/TP05/tp5exo1 - Copie (2).c:Zone.Identifier
Normal file
0
DEV1.1/TP05/tp5exo1 - Copie (2).c:Zone.Identifier
Normal file
0
DEV1.1/TP05/tp5exo1 - Copie (3).c:Zone.Identifier
Normal file
0
DEV1.1/TP05/tp5exo1 - Copie (3).c:Zone.Identifier
Normal file
0
DEV1.1/TP05/tp5exo1 - Copie.c:Zone.Identifier
Normal file
0
DEV1.1/TP05/tp5exo1 - Copie.c:Zone.Identifier
Normal file
10
DEV1.1/TP05/tp5exo1.c
Normal file
10
DEV1.1/TP05/tp5exo1.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
|
||||
|
||||
int main(void) {
|
||||
printf("%12.f\n", 12345.678910111213);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* pour qu'il en affiche 15 il faut écrire printf("%15.f\n"...)*/
|
10
DEV1.1/TP05/tp5exo2.c
Normal file
10
DEV1.1/TP05/tp5exo2.c
Normal file
@@ -0,0 +1,10 @@
|
||||
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.5);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* l'erreur est ici car ca ne prend pas %*/
|
8
DEV1.1/TP05/tp5exo3.c
Normal file
8
DEV1.1/TP05/tp5exo3.c
Normal file
@@ -0,0 +1,8 @@
|
||||
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;
|
||||
}
|
||||
|
||||
/* sa affiche les infinis positifi et négatif et nan (Not a Number)*/
|
25
DEV1.1/TP05/tp5exo4.c
Normal file
25
DEV1.1/TP05/tp5exo4.c
Normal file
@@ -0,0 +1,25 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
|
||||
int main(void) {
|
||||
|
||||
int n;
|
||||
double x;
|
||||
char m;
|
||||
|
||||
|
||||
|
||||
printf("Saisir un réel :\n");
|
||||
n = scanf("%lf",&x);
|
||||
|
||||
printf("Saisir un caratcère :\n");
|
||||
m = getchar();
|
||||
|
||||
printf("Notation scientifque : %e\n", x);
|
||||
printf("Votre caractère : %c\n", m );
|
||||
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Reference in New Issue
Block a user