Advertisement
Guest User

Untitled

a guest
Feb 19th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.50 KB | None | 0 0
  1. #include "Llista.h"
  2.  
  3. int main(){
  4. llista A;
  5. int POS;
  6. persona N;
  7. char X;
  8. CREAR ;
  9. do{
  10. system("pause");
  11. system("cls");
  12. cout << "1- Inserir" << endl;
  13. cout << "2- Eliminar" << endl;
  14. cout << "3- Quants" << endl;
  15. cout << "4- Llista plena?" << endl;
  16. cout << "5- Llista buida?" << endl;
  17. cout << "6- Obtenir" << endl;
  18. cout << "7- On es?" << endl;
  19. cout << "8- Sortir" << endl;
  20. cin >> X;
  21. switch(X){
  22. case '1':
  23. Inserir(A,N);
  24. VISUALITZAR(A);
  25. break;
  26. case '2':
  27. cout << "Quina posicio vols eliminar?"
  28. Treure(A,POS);
  29. VISUALITZAR(A);
  30. break;
  31. case '3':
  32. Quants(A);
  33. VISUALITZAR(A);
  34. break;
  35. case '4':
  36. EsPlena(A);
  37. break;
  38. case '5':
  39. EsBuida(A);
  40. break;
  41. case '6':
  42. Obtenir(A,POS);
  43. VISUALITZAR(A);
  44. break;
  45. case '7':
  46. OnEs(A,N);
  47. VISUALITZAR(A);
  48. break;
  49. case '8':
  50. return 0;
  51. default:
  52. cout << "Opcio no valida" << endl;
  53. cout << "Numero incorrecte" << endl;
  54. }
  55. }
  56. while(X!=8);
  57. system("pause");
  58. return 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement