diff --git a/DEV1.1/TP01/chiffre.c b/DEV1.1/TP01/chiffre.c new file mode 100644 index 0000000..5ff5b9d --- /dev/null +++ b/DEV1.1/TP01/chiffre.c @@ -0,0 +1,6 @@ +#include +int main(void) { + printf("%c",55); + +return 0; +} \ No newline at end of file diff --git a/DEV1.1/TP01/salut.c b/DEV1.1/TP01/salut.c index 60800b2..78155c1 100644 --- a/DEV1.1/TP01/salut.c +++ b/DEV1.1/TP01/salut.c @@ -1,7 +1,7 @@ #include int main() { - printf("Hello World ! \n"); + printf("%c","Hello World !"); return 0; } \ No newline at end of file diff --git a/DEV1.1/TP02/chiffres.c b/DEV1.1/TP02/chiffres.c new file mode 100644 index 0000000..7325f63 --- /dev/null +++ b/DEV1.1/TP02/chiffres.c @@ -0,0 +1,7 @@ +#include + +int main() { + printf("%c \n",55); + +return 0; +} \ No newline at end of file diff --git a/DEV1.1/TP02/dust.c b/DEV1.1/TP02/dust.c new file mode 100644 index 0000000..772bca3 --- /dev/null +++ b/DEV1.1/TP02/dust.c @@ -0,0 +1,9 @@ +#include +#include + +int main(void) { + printf("%.15f\n", 12345.678910111213); + return EXIT_SUCCESS; +} + +// ?????????? \ No newline at end of file diff --git a/DEV1.1/TP02/encodages.c b/DEV1.1/TP02/encodages.c new file mode 100644 index 0000000..facf75e --- /dev/null +++ b/DEV1.1/TP02/encodages.c @@ -0,0 +1,7 @@ +#include +#include +int main(void) { + printf("Unicode : %c%c\n", '\xC3', '\xAE'); + printf("Latin 1 : %c\n", '\xEE'); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/DEV1.1/TP02/extract.c b/DEV1.1/TP02/extract.c new file mode 100644 index 0000000..928e948 --- /dev/null +++ b/DEV1.1/TP02/extract.c @@ -0,0 +1,15 @@ +#include +#include + +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; + +} \ No newline at end of file diff --git a/DEV1.1/TP02/extremite.c b/DEV1.1/TP02/extremite.c new file mode 100644 index 0000000..c767cb1 --- /dev/null +++ b/DEV1.1/TP02/extremite.c @@ -0,0 +1,9 @@ +#include +#include + +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; +} \ No newline at end of file diff --git a/DEV1.1/TP02/interets.c b/DEV1.1/TP02/interets.c new file mode 100644 index 0000000..e45ca71 --- /dev/null +++ b/DEV1.1/TP02/interets.c @@ -0,0 +1,30 @@ +#include +#include + +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; +} \ No newline at end of file diff --git a/DEV1.1/TP02/lettres.c b/DEV1.1/TP02/lettres.c new file mode 100644 index 0000000..85c0eca --- /dev/null +++ b/DEV1.1/TP02/lettres.c @@ -0,0 +1,7 @@ +#include + +int main() { + printf("%c \n",65); + +return 0; +} \ No newline at end of file diff --git a/DEV1.1/TP02/operation.c b/DEV1.1/TP02/operation.c new file mode 100644 index 0000000..866d93d --- /dev/null +++ b/DEV1.1/TP02/operation.c @@ -0,0 +1,11 @@ +#include +#include + +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; +} \ No newline at end of file diff --git a/DEV1.1/TP02/telescopage.c b/DEV1.1/TP02/telescopage.c new file mode 100644 index 0000000..341e327 --- /dev/null +++ b/DEV1.1/TP02/telescopage.c @@ -0,0 +1,14 @@ +#include +#include + +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); +} \ No newline at end of file