Sunteți pe pagina 1din 8

int chiffre1(int x, int y)

{
int i, j =0;
for(i = 0; i<x; i++) //Je trace une ligne de gauche droite//
{
for(j=0; j<y; j++) //J'affiche la ligne trace au milieu de la ligne crite et j
'affiche le caractre 219//
if(j==y/2)
{
printf("%c\n", 219);
}
}
}

int traceligne(int y)
{
int i;

for(i=0;i<=y; i++)
{
printf("%c", 219);
}
}
int placebloc(int y, int position)
{
int i;
if(position == 1)
{
printf("%c",219);
}
else (position == 0);
{
for(i=0; i<=y-2; i++)
{
printf("%c", 255);

}
printf("%c", 219);

}
}

void chiffre0()
{
int taille, x, y, i, j, position;
scanf("%d", &taille);
switch(taille)
{
case 1:
x=5, y=3;
break;
case 2:
x=7, y=4;
break;
case 3:
x=9, y=5;
break;
}

for(j=0; j<=x; j++)


{
if((j==0) || (j==x))
{
traceligne(y);
printf("\n");
}
else
{
placebloc(y, position = 1);
printf("\n");
}
}
}
void chiffre3()
{int taille, x, y, i, j, position;
scanf("%d", &taille);
switch(taille)

{
case 1:
x=5, y=3;
break;
case 2:
x=7, y=4;
break;
case 3:
x=9, y=5;
break;
}
for(j=0; j<=x; j++)
{
if((j==0) || (j==x) || (j== x/2))
{
traceligne(y);
printf("\n");
}
else
{
placebloc(y+1, position = 0);
printf("\n");
}
}

}
void chiffre8()
{int taille, x, y, i, j, position;
scanf("%d", &taille);
switch(taille)
{
case 1:
x=5, y=3;
break;
case 2:
x=7, y=4;
break;
case 3:
x=9, y=5;

break;
}
for(j=0; j<=x; j++)
{
if((j==0) || (j==x) || (j== x/2))
{
traceligne(y);
printf("\n");
}
else
{placebloc(y, position =1);

printf("\n");
}
}

void chiffre2()
{int taille, x, y, i, j, position;
scanf("%d", &taille);
switch(taille)
{
case 1:
x=5, y=3;
break;

case 2:
x=7, y=4;
break;
case 3:
x=9, y=5;
break;
}
for(j=0; j<=x; j++)
{
if((j==0) || (j==x) || (j== x/2))
{
traceligne(y);
printf("\n");
}
if (j==y-2)
{placebloc(y+1, position=0);

printf("\n");
}
if(j==y)
{
placebloc(y-2, position==1);
printf("\n"); }
}

void chiffre9()
{int taille, x, y, i, j, position;
scanf("%d", &taille);

switch(taille)
{
case 1:
x=5, y=3;
break;
case 2:
x=7, y=4;
break;
case 3:
x=9, y=5;
break;
}
for(j=0; j<=x; j++)
{
if((j==0) || (j==x) || (j== x/2))
{
traceligne(y);
printf("\n");
}
else
{
placebloc(y+1, position ==0);
if(j==2)
{placebloc(y-1, position==1);
}
printf("\n");
}
}
}

void lignepleine()
{
printf("%c", 219);
printf("%c", 219);
printf("%c", 219);
printf("\n");
}
void droite()
{
printf("%c", 255);
printf("%c", 255);
printf("%c", 219);

printf("\n");
}
void gauche()
{
printf("%c", 219);
printf("%c", 255);
printf("%c",255);
printf("\n");
}
void gauchedroite()
{
printf("%c", 219);
printf("%c", 255);
printf("%c",219);
printf("\n");
}
void chiffre6()
{
lignepleine();
gauche();
lignepleine();
gauchedroite();
lignepleine();
for(indice=1; indice<(longueurafffichage-1)/2;indice++)
{
gauchedroite();
retourligne;
}
for(indice=1; indice<largeuraffichage;indice++)
{
printf("%c", carreplein);
}
printf("%c", carreplein);
}
void chiffre7()
{
lignepleine();
droite();
lignepleine();
droite();
droite();
}

void chiffre4()
{int j,x,y, position;
for(j=0; j<=x; j++)
{
if((j==0) || (j==x))

{
traceligne(y);
printf("\n");
}
else
{
placebloc(y, position = 1);
printf("\n");
}
}
}

*/

S-ar putea să vă placă și

  • Les Commandes Linux
    Les Commandes Linux
    Document3 pagini
    Les Commandes Linux
    Johann Domergue
    Încă nu există evaluări
  • MERISE
    MERISE
    Document215 pagini
    MERISE
    Johann Domergue
    Încă nu există evaluări
  • Imporant
    Imporant
    Document1 pagină
    Imporant
    Johann Domergue
    Încă nu există evaluări
  • Méthode
    Méthode
    Document8 pagini
    Méthode
    Johann Domergue
    Încă nu există evaluări
  • Livre
    Livre
    Document6 pagini
    Livre
    Johann Domergue
    Încă nu există evaluări