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

2 views (last 30 days)
i need a program to find 5 4 3 2 1 0 -1 -2 -3 -4 -5

Accepted Answer

ES
ES on 12 Jul 2017
Edited: ES on 12 Jul 2017
a = [5:-1:-5];
disp(a);

More Answers (1)

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

Categories

Find more on Image Processing Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!