I don't know how to code this number triangle
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
How to Code this following number triangle below??
0 Commenti
Risposta accettata
KSSV
il 29 Ott 2022
n = [1 11 111 1111 11111 111111 1111111];
for i = 1 : length(n)
x = num2str(n(i)^2);
s = [blanks(length(n)-i) x];
fprintf('%s\n',s)
end
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Fourier Analysis and Filtering 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!