"depot M112"

This commit is contained in:
JunkJumper
2020-05-03 14:14:20 +02:00
parent e487fc8c7c
commit d0c6ee52c6
37 changed files with 1016 additions and 0 deletions

43
TD1/exo3/exo3.cbp Executable file
View File

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="exo3" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="bin/Debug/exo3" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Debug/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
</Compiler>
</Target>
<Target title="Release">
<Option output="bin/Release/exo3" prefix_auto="1" extension_auto="1" />
<Option object_output="obj/Release/" />
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-Wall" />
</Compiler>
<Unit filename="main.c">
<Option compilerVar="CC" />
</Unit>
<Extensions>
<code_completion />
<envvars />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>

10
TD1/exo3/exo3.layout Executable file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="main.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="410" topLine="0" />
</Cursor>
</File>
</CodeBlocks_layout_file>

26
TD1/exo3/main.c Executable file
View File

@ -0,0 +1,26 @@
#include <stdio.h>
#include <stdlib.h>
int main()
{
char tab[10];
char voy;
int count = 0;
int total = 0;
for(int n = 0; n < 10; n++)
{
printf("Entrez le caractere numero %d\n", n+1);
fflush(stdin);
scanf("%char", &tab[n]);
if(tab[n] == 'a' || tab[n] == 'e' || tab[n] == 'i' || tab[n] == 'o' || tab[n] == 'u' || tab[n] == 'y')
{
count++;
}
total++;
}
printf("Il y a %d caracteres qui ont ete saisis au clavier.\n", total);
printf("Il y a %d voyelles qui ont ete saisis au clavier.\n", count);
return 0;
}