⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 namefind.c

📁 球队队员的管理
💻 C
字号:
#include"common.h"
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void nameFind(Info *Head)
{
	Info *p;
	char name[25];
	int count=0;
	printf("请输入队员名字\n");
	//while(getchar()!='\n');
	scanf("%s",&name);
	p=Head->next;
	while(p!=NULL)
	{
		if(strcmp(p->name,name)==0)
		{
			count++;
			printf("姓名:%s 编号:%s 角色:%s 薪水:%.2f 身高:%.2f 体重:%.2f 年龄:%d 加入日期:%d年%d月%d日",p->name,p->num,p->role,p->wage,p->height,p->weight,p->age,p->joinDate.year,p->joinDate.month,p->joinDate.day);
			printf("\n查找成功\n");
		}
			p=p->next;
	}
	printf("找到的人数:%d\n",count);
	if(count==0)
	{
		printf("此队员不存在\n");
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -