Array Traversal Code and Algorithm

INPUT:Array with lower bound(l) and upper bound(u)
OUTPUT:ELEMENT PRESENT IN THE ARRAY
Data Structure: Single Dimensional Array

STEP 1: START
STEP 2: WHILE(i<=u)
STEP 3: PRINT(A[i])
STEP 4: ENDWHILE
STEP 5: STOP						

Code

Output

user@computer$ enter the limit 4
enter the elements 2
enter the elements 3
enter the elements 1
enter the elements 3
2 3 1 3

 

Leave a Comment

Your email address will not be published. Required fields are marked *