Statistica
3 Domande
0 Risposte
RANK
150.070
of 300.829
REPUTAZIONE
0
CONTRIBUTI
3 Domande
0 Risposte
ACCETTAZIONE DELLE RISPOSTE
0.0%
VOTI RICEVUTI
0
RANK
of 171.210
CONTRIBUTI
0 Problemi
0 Soluzioni
PUNTEGGIO
0
NUMERO DI BADGE
0
CONTRIBUTI
0 Post
CONTRIBUTI
0 Pubblico Canali
VALUTAZIONE MEDIA
CONTRIBUTI
0 Punti principali
NUMERO MEDIO DI LIKE
Feeds
Domanda
I am currently trying to write a code that spits out all the prime numbers less than an input, n, that also have a difference of 2. So, 3 and 5, 5 and 7, and 17 and 19 and I also need to put them into a 2 column matrix. This is what I have so far.
tableName = zeros(1,2); n = input('Integer'); a = primes(n) I get a vector of all the prime numbers less than or equa...
oltre 8 anni fa | 1 risposta | 0
1
rispostaDomanda
I am currently trying to make a column array out of the different values that are produced during a while loop. A new value of n is computed each time the loop executes. Now how can I put all those values into a column array?
n = input('Integer'); i = 1; while n ~= 1; if mod(n,2) == 0; n = n/2; else n = 3*n ...
oltre 8 anni fa | 1 risposta | 0
1
rispostaDomanda
I am trying to build this code to where I can type either YES or NO when asked for the input in line 1, but whenever I type NO, an error pops up saying "Matrix dimensions must agree". I am not sure where I am going wrong.
tail_stinger = input('Has a tail/stinger?','s'); if tail_stinger == 'YES' straight_tail = input('Tail straight like a nee...
oltre 8 anni fa | 1 risposta | 0