Dudas sobre un programa
Buenas tardes
El problema que me surge es que en este programa me falta la creacion de funciones las cuales llevo varias semanas y no consigo dar con ello, si alguien pudiera ayudarme se lo agradeceria.Os dejo el programa aqui:
#include <stdio.h>
#include<string.h>
#define fil_max 30
#define col 100
int cont=0;
void baja(char mat[fil_max][col], int nota[fil_max]);
void lista(char mat[fil_max][col], int nota[fil_max]);
void modi(char mat[fil_max][col], int nota[fil_max]);
void consul(char mat[fil_max][col], int nota[fil_max]);
void leer(char mat[fil_max][col], int nota[fil_max]);
int main()
{
int num, nota[fil_max],x;
char mat[fil_max][col];
for(x=0;x<fil_max;x++)
{
nota[x]=-1;
}
do
{
printf("nnTeclee la opcion que desea ejecutar:n");
printf("1.Introducir alumnosn");
printf("2.Consultar alumnon");
printf("3.Modificar notan");
printf("4.Listadosn");
printf("5.Dar de baja alumnon");
printf("6.Salir del programan");
scanf("%d", &num);
switch(num)
{
case 1: leer(mat, nota);
break;
case 2: consul(mat, nota);
break;
case 3: modi(mat, nota);
break;
case 4: lista(mat, nota);
break;
case 5: baja(mat, nota);
break;
}
} while (num!=6);
return 0;
}
Gracias
Gracias.
El problema que me surge es que en este programa me falta la creacion de funciones las cuales llevo varias semanas y no consigo dar con ello, si alguien pudiera ayudarme se lo agradeceria.Os dejo el programa aqui:
#include <stdio.h>
#include<string.h>
#define fil_max 30
#define col 100
int cont=0;
void baja(char mat[fil_max][col], int nota[fil_max]);
void lista(char mat[fil_max][col], int nota[fil_max]);
void modi(char mat[fil_max][col], int nota[fil_max]);
void consul(char mat[fil_max][col], int nota[fil_max]);
void leer(char mat[fil_max][col], int nota[fil_max]);
int main()
{
int num, nota[fil_max],x;
char mat[fil_max][col];
for(x=0;x<fil_max;x++)
{
nota[x]=-1;
}
do
{
printf("nnTeclee la opcion que desea ejecutar:n");
printf("1.Introducir alumnosn");
printf("2.Consultar alumnon");
printf("3.Modificar notan");
printf("4.Listadosn");
printf("5.Dar de baja alumnon");
printf("6.Salir del programan");
scanf("%d", &num);
switch(num)
{
case 1: leer(mat, nota);
break;
case 2: consul(mat, nota);
break;
case 3: modi(mat, nota);
break;
case 4: lista(mat, nota);
break;
case 5: baja(mat, nota);
break;
}
} while (num!=6);
return 0;
}
Gracias
Gracias.