Skip to content

Instantly share code, notes, and snippets.

@kawzar
Last active March 31, 2022 16:24
Show Gist options
  • Save kawzar/c06e133cec11f38558dcb3c35746d204 to your computer and use it in GitHub Desktop.
Save kawzar/c06e133cec11f38558dcb3c35746d204 to your computer and use it in GitHub Desktop.
void parcial(Auto* arreglo, int longitud) {
int antiguedades[longitud];
int anioActual = 2021;
int promedioAntiguedades = 0;
for(int i = 0; i < longitud; i++) {
antiguedades[i] = anioActual - arreglo[i].anio;
promedioAntiguedades = promedioAntiguedades + antiguedades[i];
}
printf(promedioAntiguedades)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment