Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "DLL.cpp"
- int main(){
- List data;
- infotype H;
- address elm;
- createNewList(data);
- printList(data);
- for(int x = 0; x<3;x++){
- cin>>H.title;
- cin>>H.url;
- cin>>H.timestamp;
- cin>>H.visitcount;
- elm = createElemen(H);
- insertLast(data,elm);
- cout << "+>. Hasil" << endl;
- printList(data);
- }
- cout << "+>. First" << endl;
- deleteFirst(data,elm);
- printList(data);
- cout << "+>. Last" << endl;
- deleteLast(data,elm);
- printList(data);
- cout << "+>. Last" << endl;
- deleteLast(data,elm);
- printList(data);
- cout << "Part 2" << endl;
- createNewList(data);
- printList(data);
- for(int x = 0; x<3;x++){
- cin>>H.title;
- cin>>H.url;
- cin>>H.timestamp;
- cin>>H.visitcount;
- insertAscending(data,H);
- cout << "+>. Hasil" << endl;
- printList(data);
- }
- cout << findElemen(data,"OpenAI")<<endl;
- cout << moreThanOnce(data)<<endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement