how to Write a program that prints out the numbers 5 through -5 in decreasing order.

2 visualizzazioni (ultimi 30 giorni)
i need a program to find 5 4 3 2 1 0 -1 -2 -3 -4 -5

Risposta accettata

ES
ES il 12 Lug 2017
Modificato: ES il 12 Lug 2017
a = [5:-1:-5];
disp(a);

Più risposte (1)

sasi rekha
sasi rekha il 31 Mag 2021
I want a program to print 1+3+5+7 and compute it's sum

Community Treasure Hunt

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

Start Hunting!

Translated by