Backup proyecto Joyfe - Borland

This commit is contained in:
2025-06-16 22:54:10 +02:00
commit d61829a1a7
130 changed files with 11881 additions and 0 deletions

63
CPP/PROG8.CPP Normal file
View File

@ -0,0 +1,63 @@
// Prog8
//
// Programadores:
//
// Juan L<>pez Fern<72>ndez
// Mois<69>s Virumbrales Cuenca
// DAI 1<>A
//
#include <stdio.h>
#include <conio.h>
char direccion;
char caracter;
int pos_x,pos_y,con;
void main()
{
clrscr();
gotoxy (20,11);
printf ("Introduzca el car<61>cter a imprimir: ");
fflush (stdin);
cscanf ("%c", &caracter);
clrscr();
direccion='d';
pos_x=1;
pos_y=1;
for (;pos_y<=24;pos_y++)
{
for (con=1;con<=80;con++)
{
if (direccion=='d')
{
gotoxy(pos_x,pos_y);
printf ("%c",caracter);
pos_x++;
}
else
{
gotoxy(pos_x,pos_y);
printf ("%c",caracter);
pos_x--;
}
if (con==40)
{
getch();
}
}
getch();
if (direccion=='d')
{
direccion='i';
pos_x--;
}
else
{
direccion='d';
pos_x++;
}
}
gotoxy(1,25);
printf ("Pulse una tecla para finalizar...");
getch();
}