write script( a for loop that multiplies all evens numbers from 2 to 10)
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Please help
0 Commenti
Risposte (2)
Andriy Kavetsky
il 24 Ott 2016
x=2:10;
x=x(mod(x,2)==0)
res=1;
s=size(x)
for i=1:s(1) for j=1:s(2)
res=res*x(i,j);
end
end
0 Commenti
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!