Posts

Showing posts from January 21, 2013

WRITE AN ALGORITHM TO CIRCULAR SHIFT AN ARRAY

LIST OF PROGRAMS
STEP 1  START
STEP 2  READ VALUES IN ARRAY A OF SIZE 100
STEP 3  READ SIZE OF ARRAY IN N
STEP 4  LET C=0,TMP=0
STEP 5  READ VALUE IN A[C]
STEP 6  INCREMENT C BY 1 
STEP 7  IF C<100 THEN GOTO STEP 5  
STEP 8  STORE A[C]IN TMP
STEP 9  C=0
STEP 10 A[C]=A[C+1]
STEP 11 INCREMENT C BY 1 
STEP 12 IF C<99 THEN GOTO STEP 10
STEP 13 A[99]=TMP 
STEP 14 DISPLAY THE ARRAY
STEP 15 STOP 


LIST OF PROGRAMS