Added program codes with iteration support

Added program codes with iteration support