how to multiply integers
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
This is the question I got asked.
when I enter for i=1:10
k=i*222
end
1 Kommentar
Stephen23
am 6 Nov. 2018
By the way, the best method is without a loop:
V = 10 * (1:15);
fprintf('%.2f\n',V)
Antworten (1)
madhan ravi
am 6 Nov. 2018
Bearbeitet: madhan ravi
am 6 Nov. 2018
for i=1:10
k=i*222;
fprintf('value is %.2f\n',k) %or
sprintf('value is %.2f',k)
end
1 Kommentar
madhan ravi
am 6 Nov. 2018
@Taylor don't change your question after someone gives answer it makes the answer look stupid!
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!