Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. void dispRez(mov *db1, int lenMov)
  2. {
  3. int n = 50;
  4. int i, j;
  5. int k = 0;
  6. int count[n];
  7.  
  8. for (i = 0; i < lenMov; i++)
  9. {
  10. for (j = 0; j < i; j++)
  11. {
  12. if (strcmp((db1 + j)->rez, (db1 + i)->rez) == 0)
  13. {
  14. break;
  15. }
  16. else
  17. {
  18. count[k] = i;
  19. k++;
  20. }
  21. }
  22. }
  23. for (i = 0; i < k; i++)
  24. {
  25. printf("Directori %s filmid:\n", (db1 + count[i])->rez);
  26. for (j = 0; j < lenMov; j++)
  27. {
  28. if (strcmp(db1 + count[i])->rez, (db1 + j)->rez) == 0)
  29. {
  30. printf("\t%s\n", (db1 + j)->nimi);
  31. }
  32. }
  33. }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement