Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void search_()
- {
- int choice,i,c=0;
- char name[20];
- printf("enter the last name of contatct you search for:\n");
- scanf("%s",name);
- system("cls");
- printf("the results:\n");
- for(i=0; i<counter ; i++)
- {
- if(strcmpi(name,person[i].lname)!='\0')
- {
- printf("first name: %s\nlast name: %s\nAddress: %s\nCity: %s\nNumber: %s\n",person[i].fname,person[i].lname,person[i].address,person[i].city,person[i].number);
- c++;
- }
- }
- if(c==0)
- printf("the name doesn't exist.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement