Red de conocimiento informático - Conocimiento del nombre de dominio - ¡Urgente, urgente, urgente! Preguntas sobre programación en lenguaje c, gracias a todos los héroes.

¡Urgente, urgente, urgente! Preguntas sobre programación en lenguaje c, gracias a todos los héroes.

#include lt;stdio.hgt;

#include lt;stdlib.hgt;

//#include lt;memory.hgt;

#define NO_LENGTH 10

#define NAME_LENGTH 20

#define NO_OF_STUDENTS 30

estructura StuSco

{

char m_stuNo[NO_LENGTH 1]; //número de estudiante

char m_name[NAME_LENGTH 1]; //nombre

double m_socre1;

double m_socre2; //Puntuación 2

double m_socre3; //Puntuación 3

double m_socre4; //Puntuación 4

double m_perSocre; Nota media

};

StuSco * InPutStuInfo()

{

StuSco *pNewStructs = (StuSco *)malloc(sizeof( StuSco) * NO_OF_STUDENTS);

// memset(pNewStructs, 0, sizeof(StuSco) * NO_OF_STUDENTS);

for (int i = 0; i != NO_OF_STUDENTS; i)

{

printf("Ingrese el número de estudiante, el nombre y cuatro calificaciones del estudiante d en secuencia (separados por espacios y terminados con retorno de carro):\n", i 1 );

StuSco *p = pNewStructs i;

scanf("s ", p-gt; m_stuNo); p -gt;m_name);

doble k;

scanf("lf lf lf lf", amp;p-gt;m_socre1, amp;p-gt;m_socre2, amp ; p-gt;m_socre3, amp;p-gt;m_socre4);

p-gt;m_perSocre = (p-gt;m_socre1 p-gt;m_socre2 p-gt;m_socre3 p-gt;m_socre4 ) /4;

}

devuelve pNewStructs

}

void OutPutInfo(StuSco * pInfoStructs)

{

for (int i = 0; i != NO_OF_STUDENTS; i)

{

StuSco *p = pInfoStructs i; p > printf("Número de estudiante del désimo estudiante: s Nombre: s \nCuatro puntajes: .2lf, .2lf, .2lf, .2lf \nPuntuación promedio: .2lf\n",\

i

1, p-gt; m_stuNo, p-gt; m_nombre, p-gt; m_socre1, m_perSocre);

}

}

void ReleaseStuInfo(StuSco * pInfoStructs)

{

gratis(pInfoStructs);

}

int main()

{

StuSco * pInfoStructs = InPutStuInfo();

OutPutInfo(pInfoStructs);

ReleaseStuInfo(pInfoStructs);

return 0;

}

Como referencia, no tengo problemas para ejecutarlo. ^_^