Who can qiuckly write me a simple program with list based on smth like that:
and with functions to:Code:struct s {
double nr;
struct s *next;
};
- print the list
- add element at the beggining
- add element at the end
- add element after given value
- add element as sorted
- delete one element
- delete all elements of given value
- delete all elements
with some easy to understand names (of functions, variables etc) and with some comments to help me to understand program.
And i have a question? Why the hell is it double, and it doesn't work with int?
Please help me i have to show and it and explain to my teacher in few hours... :/