% -----------------------------------------------------
% whileloopdisplaycount.m
% -----------------------------------------------------
% Write a program that asks the user for a starting count,
% an ending count and displays the integers from one to 
% the other. 
% -----------------------------------------------------
% Notes: Use a while loop
% -----------------------------------------------------
% Copyright and license details available at matlabmarina.com
%------------------------------------------------------

clear;
clc;

% read in the start and end count from user
startCount = input('Enter number to start count at : '); 

endCount = input('Enter number to count to: '); 

%  display and increase initial count by 1 until it surpasses the end count
while (startCount <= endCount)          % while condition
    disp(startCount);
    startCount = startCount + 1;        % update counter by 1
end

