diff --git a/APL1.1/CM1/Fleur b/APL1.1/CM1/Fleur new file mode 100755 index 0000000..2ceab37 Binary files /dev/null and b/APL1.1/CM1/Fleur differ diff --git a/APL1.1/CM1/Fleur.c b/APL1.1/CM1/Fleur.c new file mode 100644 index 0000000..3dc96e0 --- /dev/null +++ b/APL1.1/CM1/Fleur.c @@ -0,0 +1,14 @@ +#include +#include + +int main (void) { + printf (" _\n"); + printf (" _( )_\n"); + printf (" (_(%)_)\n"); + printf (" /(_)\n"); + printf ("__ | \n"); + printf ("\\_\\|\n"); + printf (" |\n"); + printf (" |\n"); + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/APL1.1/CM1/Flopée b/APL1.1/CM1/Flopée new file mode 100755 index 0000000..37bec62 Binary files /dev/null and b/APL1.1/CM1/Flopée differ diff --git a/APL1.1/CM1/Flopée.c b/APL1.1/CM1/Flopée.c new file mode 100644 index 0000000..9318181 --- /dev/null +++ b/APL1.1/CM1/Flopée.c @@ -0,0 +1,10 @@ +#include +#include +int main(void){ + int i; + int j = i*i*i + for (i=0;i<;i++){ + printf("%d ",i); +} +return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/APL1.1/CM1/Format b/APL1.1/CM1/Format new file mode 100755 index 0000000..c51848c Binary files /dev/null and b/APL1.1/CM1/Format differ diff --git a/APL1.1/CM1/Format.c b/APL1.1/CM1/Format.c new file mode 100644 index 0000000..d0d8dbb --- /dev/null +++ b/APL1.1/CM1/Format.c @@ -0,0 +1,16 @@ +#include +#include + +int main(void) { + unsigned int a = 65U; + int b = 65; + float c = 65.00; + signed char d = 65; + printf("%u\n", a); + printf("%hhd\n", d); + printf("%.0f\n", c); + printf("%s\n", b); + printf("%.0f\n", c); + + return EXIT_SUCCESS; +} \ No newline at end of file diff --git a/APL1.1/CM1/Foulées b/APL1.1/CM1/Foulées new file mode 100755 index 0000000..8447ac6 Binary files /dev/null and b/APL1.1/CM1/Foulées differ diff --git a/APL1.1/CM1/Foulées.c b/APL1.1/CM1/Foulées.c new file mode 100644 index 0000000..17ddf66 --- /dev/null +++ b/APL1.1/CM1/Foulées.c @@ -0,0 +1,35 @@ +#include +#include + +int main (void){ + int distance,tour = 192,nombre_tours,distance_restante,demi_tours; + printf("Entrez une distance en mètres : "); + scanf("%d",&distance); + nombre_tours = distance/tour; + distance_restante = distance - (192*nombre_tours); + if (distance_restante < 96){ + if (nombre_tours > 1 ){ + printf("Vous avez effectué %d tours\n",nombre_tours); + } + if (nombre_tours == 1 ){ + printf("Vous avez éffectué 1 tour\n"); + } + if (nombre_tours == 0 ){ + printf("Vous n'avez pas efféctué un tour\n"); + } + } + else{ + if (nombre_tours > 1 ){ + printf("Vous avez effectué %d tours et demi\n",nombre_tours); + } + else{ + if (nombre_tours = 1 ){ + printf("Vous avez éffectué 1 tour et demi\n"); + } + if (nombre_tours = 0 ){ + printf("Vous n'avez effectué un demi tour\n"); + } + } + } + return EXIT_SUCCESS; +} \ No newline at end of file