How to Create a Multiplication Table in MATLAB Using while Loops

18 ビュー (過去 30 日間)
Yalaw M.
Yalaw M. 2021 年 2 月 11 日
回答済み: KSSV 2021 年 2 月 11 日
i want answer like this
7*1=7
.
.
.
.
7*12=84
help me

採用された回答

KSSV
KSSV 2021 年 2 月 11 日
% Create 7 table
n = 1:13;
m = n.*7;
table = [n;m] ;
fprintf('7 x %d = %d \n',table)
7 x 1 = 7 7 x 2 = 14 7 x 3 = 21 7 x 4 = 28 7 x 5 = 35 7 x 6 = 42 7 x 7 = 49 7 x 8 = 56 7 x 9 = 63 7 x 10 = 70 7 x 11 = 77 7 x 12 = 84 7 x 13 = 91

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by