We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1153228 commit 53bf0b5Copy full SHA for 53bf0b5
print lower to upper rang numners.m
@@ -0,0 +1,17 @@
1
+%{
2
+ Write a MATLAB program that will display the numbers from a user specified start
3
+ number to a user specified stop number. Assume that the second number the user
4
+ enters will be larger than the first number. Use iteration (for loop) to solve this problem.
5
+ Run your program and verify that it operates correctly. A sample run should look like:
6
+ Enter number 1: 4
7
+ Enter number 2: 9
8
+ 1 2 3 4
9
+ 2 3 4 5 6 7 8 9
10
+%}
11
+
12
+num1 = input('1st Qus START Num: ');
13
+num2 = input('End Num: ');
14
15
+for num = num1:num2
16
+ disp(num);
17
+end
0 commit comments