In wxmaxima, for my assignment I was given a list exp. L:[1,-2,3,4,-5,11,-12]
I need to count members of the list that are less than 0, print that data and print such members. I used:
L:[1,-2,3,4,-5,11,-12]$
n: length(L)$
for k:1 thru n step 1 do
if L[k]<0 then print(L[k]);
and I got:
-2
-5
-12
done
My question is, how do I get the number of members,which in this example would be 3, printed?