您当前的位置: 首页 >  链表

川川菜鸟

暂无认证

  • 5浏览

    0关注

    969博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

单链表:求所有不及格人数的累计数

川川菜鸟 发布时间:2021-04-19 12:51:54 ,浏览量:5

#include
#include
#include 
using namespace std;
typedef int ElemType;
#define M 20
typedef struct LNode
{
	ElemType data;	//定义数据与
	struct LNode* next;	//指针域
}LNode, * LinkList;
void CreateLink(LinkList& h, ElemType a[], int n)
{
	LinkList s, tc; int i;
	h = (LinkList)malloc(sizeof(LinkList));
	tc = h;
	for (i = 0; i data = a[i];
		tc->next = s;
		tc = s;
	}
	tc->next = NULL;
}
int Count(LinkList sl)
{
	int k = 0;
	LNode* p;
	if (sl->next == NULL)return 0;
	p = sl->next;

	//不及格判断
	while (p != NULL)
	{
		if (p->data next;
	}
	return k;
}
void main()
{
	int N;
	//cout             
关注
打赏
1665165634
查看更多评论
0.0493s