17070047 / 17070047/CodeStructureCourse

石江雨

Ouverte
#60 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
C++
Étoiles
16
Forks
2
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

```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)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
c
Domaine
cli
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
45/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.