#include
#include
struct member{
char name[15];
char number[15];
};
void main(){
int n,i;
printf("请输入成员个数");
scanf("%d",&n);
struct member mem[n];
printf("请依次输入姓名、电话\n");
for(i=0;i<n;i++){
gets(mem[i].name);
gets(mem[i].number);
}
printf("请输入姓名");
char temp[15];
gets(temp);
if(strlen(temp)==0){
for(i=0;i<n;i++){
puts(mem[i].name);
puts(mem[i].number);
}
}else{
for(i=0;i<n;i++){
if(strcmp(temp,mem[i].name)==0){
puts(mem[i].name);
puts(mem[i].number);
break;
}
}
}