| Author |
Message |
Eolill
Joined: 21 Feb 2009 Posts: 1
|
Posted: February 21, 2009 4:43 PM Post subject: Inputting values to lists |
|
|
| So, I feel rather dumb, but I can't figure out how to add an element to a list. On the old calculators it appeared to work with the store button (x --> L1), but if I write that, it thinks L1 is a variable, and not a list. I just want to add a number onto the list, and, if possible, check if a number is divisible by any of the elements on the list. |
|
| Back to top |
|
 |
jmurphy1337
Joined: 03 Jan 2010 Posts: 4
|
Posted: January 3, 2010 9:17 PM Post subject: |
|
|
In order to add on an extra number to a list, use the augment function.
augment({1,2},{3}) produces
{1 2 3}
As for seeing if a number is divisible by any elements in the list, use the mod function.
mod(8,{1,2,3}) produces
{0 0 2}
Meaning that 1 and 2 divide 8 with no remainder. |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|
Saphic 1.5 // Theme created by Sopel
|
|