-
-
Save parzibyte/995f8dfd5f33ca55bb344c1fb182498d 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 llenarMatriz(float matriz[CANTIDAD_ALUMNOS][CANTIDAD_MATERIAS + 1]) | |
{ | |
int y, x; | |
for (y = 0; y < CANTIDAD_ALUMNOS; y++) | |
{ | |
float suma = 0; | |
for (x = 0; x < CANTIDAD_MATERIAS; x++) | |
{ | |
int calificacion = aleatorio_en_rango(MINIMA_CALIFICACION, MAXIMA_CALIFICACION); | |
suma += (float)calificacion; | |
matriz[y][x] = calificacion; | |
} | |
// Agregar promedio | |
float promedio = suma / CANTIDAD_MATERIAS; | |
matriz[y][CANTIDAD_MATERIAS] = promedio; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment