This commit is contained in:
Simon SAYE BABU 2022-09-14 18:00:01 +02:00
parent 701e40bdaa
commit e6f98c7754
11 changed files with 116 additions and 1 deletions

6
DEV1.1/TP01/chiffre.c Normal file
View File

@ -0,0 +1,6 @@
#include <stdio.h>
int main(void) {
printf("%c",55);
return 0;
}

View File

@ -1,7 +1,7 @@
#include <stdio.h> #include <stdio.h>
int main() { int main() {
printf("Hello World ! \n"); printf("%c","Hello World !");
return 0; return 0;
} }

7
DEV1.1/TP02/chiffres.c Normal file
View File

@ -0,0 +1,7 @@
#include <stdio.h>
int main() {
printf("%c \n",55);
return 0;
}

9
DEV1.1/TP02/dust.c Normal file
View File

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

7
DEV1.1/TP02/encodages.c Normal file
View File

@ -0,0 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
int main(void) {
printf("Unicode : %c%c\n", '\xC3', '\xAE');
printf("Latin 1 : %c\n", '\xEE');
return EXIT_SUCCESS;
}

15
DEV1.1/TP02/extract.c Normal file
View File

@ -0,0 +1,15 @@
#include <stdio.h>
#include <stdlib.h>
int main(void) {
char num;
printf("%s","Entrez votre numero de securite sociale: ");
num = getchar();
int annee1=getchar();
int annee2=getchar();
int mois1=getchar();
int mois2=getchar();
printf(" %c%c/%c%c \n",annee1,annee2,mois1,mois2);
return EXIT_SUCCESS;
}

9
DEV1.1/TP02/extremite.c Normal file
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;
}

30
DEV1.1/TP02/interets.c Normal file
View File

@ -0,0 +1,30 @@
#include <stdio.h>
#include <stdlib.h>
int main(void){
double n=0;
int annee=1;
printf("saisir la somme a investir: ");
scanf("lf",&n);
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
n= n + (n*0.04);
printf("somme au bout de %d annee(s): %9.4f \n", annee, n);
annee+=1;
}

7
DEV1.1/TP02/lettres.c Normal file
View File

@ -0,0 +1,7 @@
#include <stdio.h>
int main() {
printf("%c \n",65);
return 0;
}

11
DEV1.1/TP02/operation.c Normal file
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);
// % marche pas pour les double ou floatprintf("%f\n", 5.0%2.5);
return EXIT_SUCCESS;
}

14
DEV1.1/TP02/telescopage.c Normal file
View File

@ -0,0 +1,14 @@
#include <stdio.h>
#include <stdlib.h>
int main(void){
double n=0;
printf("saisir un reel: ");
scanf("%lf",&n);
printf("%.10e \n",n);
char lettre;
printf("saisir un charactere: ");
lettre = getchar();
lettre = getchar();
printf("%c%c%c%c%c",lettre,lettre,lettre,lettre,lettre);
}