Compare commits

...

3 commits

Author SHA1 Message Date
6a6ad6ac7e Mettre à jour 'TD1.c' 2023-02-16 15:10:02 +01:00
Brossier Louis-Gabriel
e8abaa204f espagnol2 2023-02-16 15:06:28 +01:00
Brossier Louis-Gabriel
0c3589607f ajouter_bouton 2023-02-16 14:44:57 +01:00
2 changed files with 44 additions and 0 deletions

42
TD1.c Normal file
View file

@ -0,0 +1,42 @@
#include <stdio.h>
int dim=3;
int tab[3];
void afficherTableau (int tab [], int dim)
{
int i ;
for (i=0;i<dim;i++)
{ printf ("%d", tab[i]);
printf ("\n");
}
}
int main()
{
int c ;
int compteur=1;
int i;
tab[0]=1;
tab[1]=3;
tab[2]=2;
while (compteur!=0)
{
compteur=0;
for (i=0;i<dim;i++)
{
if(tab[i+1]<tab[i])
{
c=tab[i+1];
tab[i+1]=tab[i];
tab[i]=c;
compteur++;
}
}
}
afficherTableau(tab,dim);
}
//commentaire

2
hola Normal file
View file

@ -0,0 +1,2 @@
hola
Soy louis-Gabriel y tu?