Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include "DLL.cpp"
- void InsertLoop(List &Data){
- string name;
- float rate;
- for(int x=0;x<4;x++){
- cout <<"Input Name : ";
- cin >> name;
- cout <<"Rate : ";
- cin >> rate;
- address data1 = createNewElement(name,rate);
- InsertFirst(Data,data1);
- }
- }
- int main(){
- List Data,upper,under;
- CreateList(Data);
- CreateList(upper);
- CreateList(under);
- InsertLoop(Data);
- ShowList(Data);
- address data2;
- DeleteFirst(Data,data2);
- cout << "================================" << endl;
- cout << "Data yang dihapus : "<< endl;
- cout << "Name : "<< info(data2).name << endl;
- cout << "Rate : " << info(data2).rating << endl;
- cout << "================================" << endl;
- Reset(Data);
- InsertLoop(Data);
- ShowList(Data);
- float inputRating;
- cout <<"Input Rating for split Data : ";
- cin >> inputRating;
- SplitData(inputRating,Data,under,upper);
- cout <<"Data upper rating : " <<endl;
- ShowList(upper);
- cout <<"Data Under rating : " <<endl;
- ShowList(under);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement