2840 FOR L=1 TO K