Advertisement
Guest User

Untitled

a guest
Jun 22nd, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.11 KB | None | 0 0
  1.   #include "eile.h"
  2.  
  3.  
  4.  
  5.  
  6. EilSar Sarasas; //sukuriamas dekas
  7. Data x;
  8.  
  9.         //void LR();
  10.         //void AVL();
  11.     //  void AK(); 
  12.     //  void Meniu();
  13.  
  14.  
  15.  
  16.  
  17. void LR(){
  18. //--------------------------------------------------------------------------------------
  19.     cout << "iveskite prognozuotoja... nu ta levaka" << endl;
  20.     cin >> x.vardas;
  21. //--------------------------------------------------------------------------------------
  22. Sarasas.insertLast(x);
  23. }
  24.  
  25. void AK(){
  26. removeFirst();
  27. }
  28.  
  29. void AVL(){
  30.     Sarasas.displayList();
  31.     getch();
  32. }
  33.  
  34. int main(){
  35.     while(1)
  36.     {
  37.         int c;
  38.     system("cls");
  39.  
  40.     cout << "                 Oru Prognozes" << endl;
  41.     cout << "---------------------------------------------" <<endl;
  42.     cout << "[1] Lopo Registravimas" << endl;
  43.     cout << "[2] Aptarnauti klijenta" << endl;
  44.     cout << "[3] Atvaiduoti visus Lopus" << endl;
  45.  
  46.     cout << "---------------------------------------------" <<endl;
  47.  
  48.     scanf("%d",&c);
  49.    
  50.     system("cls");
  51.    
  52.     if(c<1 || c>3){
  53.         printf("Invalid Choise\n");
  54.     }
  55.  
  56.     else if(c==1)
  57.         LR();
  58.     else if(c==2)
  59.         AK();
  60.     else if(c==3)
  61.         AVL();
  62.     }
  63.     Sarasas.displayList();
  64. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement