Here it is:
Code:
#include <stdio.h>
#include <conio.h>
#include <string.h>
int main ()
{
float NOTA[3][4],MEDIA,SOMA;
int CONTN,CONTY,CONTA;
char NOME[3][31];
SOMA = 0;
CONTN = 0;
CONTY = 0;
CONTA = 0;
for (CONTN=0;CONTN<3;CONTN++)
{
printf ("\nDigite o nome:");
gets (NOME[CONTN]);
CONTA = CONTA++;
if (!strcmp(NOME[CONTN], "fim"))
break;
for (CONTY=0;CONTY<3;CONTY++)
{
printf ("\nNota %d:",CONTY);
scanf ("%f",&NOTA[CONTN][CONTY]);
SOMA = SOMA+NOTA[CONTN][CONTY];
}
MEDIA = SOMA/3;
NOTA[CONTN][3] = MEDIA;
}
printf ("Nome, Media");
for (CONTN=0;CONTN<CONTA;CONTN++)
{
printf ("\n%s %.2f",NOME[CONTN],MEDIA);
}
getch();
}
The first name apparently goes ok... after that it goes wrong =o
BTW: I'm just testing with 3 names first...
BTW²: I'm using portugues words.. (Nome = Name) (Media = Average)
Thanks... again ;[