17070047 / 17070047/CodeStructureCourse

石江雨

未关闭
#60 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
C++
星标
16
派生
2
PR 合并指标
30 天内没有已合并 PR

描述

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

贡献指南

这个仓库没有索引到贡献指南

调研方向

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.

由索引模型根据 Issue 内容生成。

评估

技术栈
c
领域
cli
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。