how to multiply integers

9 visualizaciones (últimos 30 días)
Taylor Mattison
Taylor Mattison el 6 de Nov. de 2018
Comentada: madhan ravi el 6 de Nov. de 2018
This is the question I got asked.
when I enter for i=1:10
k=i*222
end
  1 comentario
Stephen23
Stephen23 el 6 de Nov. de 2018
By the way, the best method is without a loop:
V = 10 * (1:15);
fprintf('%.2f\n',V)

Iniciar sesión para comentar.

Respuestas (1)

madhan ravi
madhan ravi el 6 de Nov. de 2018
Editada: madhan ravi el 6 de Nov. de 2018
for i=1:10
k=i*222;
fprintf('value is %.2f\n',k) %or
sprintf('value is %.2f',k)
end
  1 comentario
madhan ravi
madhan ravi el 6 de Nov. de 2018
@Taylor don't change your question after someone gives answer it makes the answer look stupid!

Iniciar sesión para comentar.

Categorías

Más información sobre MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by