06. List Manipulation Advanced
Now we will implement more complicated list commands, extending the previous task. Again, read a
list, and until you receive "end" read commands:
Contains {number} – check if the list contains the number. If yes print "Yes", otherwise print "No
such number"
PrintEven – print all the numbers that are even separated by a space
PrintOdd – print all the numbers that are odd separated by a space
GetSum – print the sum of all the numbers
Filter {condition} {number} – print all the numbers that fulfill that condition. The condition will be
either '<','>'.">=","<="
After the end command print the list only if you have made some changes to the original list.
Changes are made only from the commands from the previous task.
Може ли някой да ми помогне с решаването на тази задача..