📄 searches.c
字号:
#include<stdio.h>
#include<string.h>
#include"phbook.h"
void searches()
{
char name[20];
int i,key;
key=0;
printf("Whose number do you wanna find:");
scanf("%s",&name);
fp = fopen("file1","r");
fread(s,sizeof(struct test),sumno,fp);
fclose(fp);
for(i=0;i<sumno;i++)
if(strcmp(s[i].name,name)==0)
{
printf("The one you wanna find is:\n");
printf("%-20s %s\n",s[i].name,s[i].No);
key++;
}
if(key==0)
printf("The people you find is not in the phoonbook!");
face();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -