Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "ALISTLIB.CPP"
- int Xoa_5(List *L){
- Position p;
- p = FirstList(*L);
- while (p!=EndList(*L)){
- if (Retrieve(p,*L)%5 == 0){
- Delete_List(p,L);
- p--;
- }
- p=Next(p,*L);
- }
- }
- int tangdan(List L){
- Position p;
- p = FirstList(L);
- p = Next(p,L);
- while (p!=EndList(L)){
- if (Retrieve(p,L)<Retrieve(p-1,L)){
- return false;
- }
- p=Next(p,L);
- }
- return true;
- }
- int main(){
- List Test;
- Read_List(&Test);
- Print_List(Test);
- printf("\n");
- Xoa_5(&Test);
- Print_List(Test);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement