1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
#include <iostream>
#include <string>
#include <math.h>
#include <fstream>
#include "trida.h"
using namespace std;
int main()
{
cout << "TOTO JE SEZNAM MYCH NEJOBLIBENEJSICH SERIALU" << endl;
seznam s;
t.inicializaceSeznamu(s);
t.PridejNaZacatek(s, "Penny Dreadful", 27, 2014);
t.PridejNaZacatek(s, "The Magicians", 52, 2015);
t.PridejNaZacatek(s, "Rick and Morty", 36, 2013);
t.PridejNaZacatek(s, "You're the worst", 62, 2014);
t.PridejNaZacatek(s, "Dirk Gently's Holistic Detective Agency", 18, 2016);
t.PridejNaZacatek(s, "Disenchantment", 20, 2018);
t.PridejNaZacatek(s, "Santa Clarita Diet", 30, 2017);
t.vypisJmena(s);
int n;
do {
cout << endl;
cout << endl;
cout << "Stiskni:" << endl;
cout << "1 - pokud chces seradit seznam podle abecedy" << endl;
cout << "2 - pokud chces vyhledat prvek" << endl;
cout << "3 - pokud chces videt pocet epizod a rok vydani" << endl;
cout << "4 - pokud chces seznam prevest do poznamkoveho bloku" << endl;
cout << "5 - pokud chces program ukoncit" << endl;
cin >> n;
if (n==1){t.SerazeniPodleJmena(s);
t.vypisJmena(s);
continue;
}
if (n==2){
}
if (n==3){ t.vypisSeznamu(s);
cout << endl;
cout << "Chces serialy seradit podle abecedy" << endl;
cout << endl;
cout << "1 - ANO" << endl;
cout << "2 -NE" << endl;
int v;
cin >> v;
if(v==1){
t.SerazeniPodleJmena(s);
t.vypisSeznamu(s);
}
if(v==2){
continue;
}
if(v>2);
}
if (n==4){
}
if(n==5){
t.smazSeznam(s);
break;
}
if (n>5) {cout << "Zvolil jsi spatne cislo. Zkus to znova" << endl;
continue;
}
} while (n!=5);
cout << "Konec programu" << endl;
return 0;
}
|