17070047 / 17070047/CodeStructureCourse

石江雨

Abierto
#60 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
C++
Estrellas
16
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

```c
#include
#include
#include
#define MAXSIZE 100
struct cardinfo{
int number;//卡号
char name[10];//名字
char major[15];//系别
int classnumber;//班号
};//借书证信息结点的结构体
cardinfo a[MAXSIZE];
//录入基本信息
void create(int n)
{
for(int i=1;i<=n;i++)
{
printf("输入持卡人的卡号:");
scanf("%d",&(a[i].number));
printf("输入持卡人的姓名:");
scanf("%s",&a[i].name);
printf("输入持卡人的系别:");
scanf("%s",&a[i].major);
printf("输入持卡人的班号:");
scanf("%d",&a[i].classnumber);
printf("\n");
}//输入n个借书卡的信息
}
//直接插入排序
void insertsort(int n)
{
int i,j;
for(i=2;i<=n;i++)
{
j=i-1;
a[0]=a[i];
while(a[0].number=0)
{
printf("请输入选择:");
scanf("%d",&i);
switch(i)
{
case 1:
output(n);
break;
case 2:
insertsort(n);
output(n);
break;
case 3:
search(n);
break;
}
}
return 0;
}
```
![x g3_ xz2m pjk0 s5 10 6](https://user-images.githubusercontent.com/45330214/49648558-33a4a500-fa61-11e8-9cee-b43ca1ca4f20.png)
![wyzzacmep yc qeb6 2kird](https://user-images.githubusercontent.com/45330214/49648564-369f9580-fa61-11e8-90c5-d4a4a23c962a.png)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

The issue contains a C program for a library card system with sorting and search functions. The user posted code and two screenshots, but the exact problem is not stated. Start by examining the code in the issue body for logical errors, buffer overflows, or incorrect array indexing (note arrays start at 1). Run the program to see if it crashes or produces wrong output. The goal is to identify and fix the bug implied by the screenshots, which might show runtime behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
c
Área
cli
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.