Advertisement
ahmad_zizo

Untitled

Dec 25th, 2013
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. void search_()
  2. {
  3. int choice,i,c=0;
  4. char name[20];
  5. printf("enter the last name of contatct you search for:\n");
  6. scanf("%s",name);
  7. system("cls");
  8. printf("the results:\n");
  9. for(i=0; i<counter ; i++)
  10. {
  11. if(strcmpi(name,person[i].lname)!='\0')
  12. {
  13. 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);
  14. c++;
  15. }
  16. }
  17. if(c==0)
  18. printf("the name doesn't exist.");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement