Questa domanda è chiusa. Riaprila per modificarla o per rispondere.
How do you determine which numbers in a vector are factors of 144 by indexing through it using loops?
1 visualizzazione (ultimi 30 giorni)
I have a vector of random integer from 1 to 100 with the amount of elements that a user inputs. All operations must be performed using loops, not built-in functions or array operations.
elements = input('Enter how many elements are in the vector: ');
vector = randi([1,100],1,elements)
How do I determine how many numbers in the vector are factors of 144 and what those number are?