C Título del diseño del curso: Diseño del sistema de pedido de productos ¡Ayúdame a editarlo!
#include "stdio.h"/*Función de E/S*/
#include "stdlib.h"/* otros comentarios*/
# include "string.h"/*Función de cadena*/
#include "conio.h"/* Función de operación de pantalla**
#include "mem.h"/* Memoria Función de operación**
#include "ctype.h"/* Función de operación de caracteres**
#include "alloc.h"
puntuación de estructura p>
puntuación de estructura
p>
{
int mingci
char xuehao[8]; char mingzi[20];
puntuación flotante[6];
}datos, información[1000];
int i, j, k=0;
char temp[20], ch;
ARCHIVO *fp, *fp1
void shuru()
{
if((fp=fopen("s_score.txt", "ab "))==NULL)
{
printf("no se puede abrir este archivo.\n") ;
getch(); salir( 0
}
for(i=0;ilt;=1000;i)
{
printf("/ nPor favor, shuru xuehao: ");
gets(data.
gets(temp); data.score[3] =atof(temp);
printf ("Por favor, shuru wuli puntuación:");
gets(temp.score[3]=atof(temp); );
printf("Por favor, shuru huaxue puntuación: ");
gets(temp); data.score[4]=atof(temp
data.score); [5]=datos.puntuación[0] datos.puntuación[ 1] datos.puntuación[2] datos.puntuación[3] datos.puntuación[4]
fwrite(amp;data,sizeof( datos),1,fp);
p>printf("otro?s/n"
ch=getch(); if(ch=='n'||ch==' N')
romper
} fclose(fp); >
void xianshi()
{
float s; int n;
if((fp=fopen("s_score.txt", " rb "))==NULL)
{
printf("No se puede leer este archivo.\ n");
exit(0); p>
}
para (i=0;ilt;=1000;i
)
{
if((fread(amp; info[i], sizeof(info[i]), 1, fp))! =1)
break;
}
printf("/nxuehao mingzi yuwen shuxue yingyu wuli huauxue zhongfen\n"); =1;jlt;i;j,k)
{
info[j].mingci=k
printf("6s 8s 3.1f 3.1; f 3.1f 3.1f 3.1f\n", info[j].xuehao, info[j].mingzi, info[j].score[0], info[j].score[1], info[j]. puntuación[2], info[j].puntuación[3], info[j].puntuación[4],
info[j].puntuación[5]); }
getch.
getch();
fclose(fp);
}
void xiugai; ()
{
if((fp=fopen("s_score.txt", "rb "))==NULL||(fp1=fopen("temp.txt" , "wb "))==NULL )
{
printf("No se puede abrir este archivo.\n");
exit(0);
}
printf("/nPLease shuru xiugai xuehao:");
scanf("d",amp;i));
scanf("/nPLease shuru xiugai xuehao.d",amp;i);getchar();
while((fread(amp;data,sizeof(data),1,fp)) ==1)
{
j=atoi(data.xuehao);
if(j==i)
{
printf("xuehao: s\nmingzi: s\n", datos.xuehao, datos.mingzi
);