Add element message alert
This commit is contained in:
parent
b9356d3bc3
commit
10fe1747d3
@ -98,6 +98,8 @@ void add_first(int element)
|
||||
// set the next of head into null
|
||||
head->next = NULL;
|
||||
|
||||
printf("Element %d has been added into the first!", element);
|
||||
|
||||
// return or end this process
|
||||
return;
|
||||
}
|
||||
@ -108,6 +110,8 @@ void add_first(int element)
|
||||
|
||||
// replace the head node from current node
|
||||
head = node;
|
||||
|
||||
printf("Element %d has been added into the first!", element);
|
||||
}
|
||||
|
||||
void add_last(int element)
|
||||
|
Loading…
Reference in New Issue
Block a user