-
-
Save parzibyte/37b014d562fc42c9a26140e37023b5ca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void leeCodigo(char matriz[LONGITUD][LONGITUD]) | |
{ | |
printf("Ingresa el codigo: "); | |
scanf("%c", &codigoGlobal); | |
char letra = 'A'; | |
int y = 0, x = 0; | |
while (letra <= 'Z') | |
{ | |
if (letra == codigoGlobal) | |
{ | |
letra++; | |
} | |
// Comprobación extra para cuando el código es 'Z' | |
if (letra <= 'Z') | |
{ | |
matriz[y][x] = letra; | |
} | |
x++; | |
letra++; | |
if (x >= LONGITUD) | |
{ | |
x = 0; | |
y++; | |
} | |
if (y >= LONGITUD) | |
{ | |
y = 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment