1 REM PRINDLAS
5 CLEAR 1000
10 CLS
20 PRINT TAB(10); "LASPEYRES PRICE INDEX":PRINT
30 PRINT"COMPARING PRICES AT A FIXED TIME IN THE PAST, CALLED THE
35 PRINT"BASE YEAR TO CURRENT PRICES IS NOT THAT SIMPLE. THIS IS
40 PRINT"BECAUSE NEW ITEMS HIT THE MARKET AND USE OF OTHER ITEMS
45 PRINT"CHANGE THROUGH THE YEARS. THE U.S. DEPARTMENT OF LABOR USES
50 PRINT"A METHOD BY WHICH QUANTITIES FOR THE BASE YEAR ARE USED AND
55 PRINT"ARE WEIGHTED ONCE WITH BASE YEAR PRICES AND ONCE WITH CURRENT
60 PRINT"PRICES. THESE TWO WEIGHTINGS ARE DIVIDED AND THE QUOTIENT
65 PRINT"IS MULTIPLIED BY 100 GIVING THE LASPEYRES PRICE INDEX.
70 PRINT"IF THE INDEX IS GREATER THAN 100 THEN PRICES HAVE INCREASED.
90 PRINT:INPUT"PRESS ENTER TO CONTINUE";Z9$
95 DIM PB(100),PC(100),QB(100)
100 CLS
110 PRINT"INPUT ITEMS IN INDEX 1 BY 1 AS REQUESTED. A NEGATIVE QUANTITY
120 PRINT"MEANS THAT THE USER HAS FINISHED INPUTTING THE DATA.
130 PRINT
140 I=0
150 PRINT"FOR ITEM #";I+1;" ENTER THE FOLLOWING:"
160 INPUT"       BASE YEAR QUANTITY(NEGATIVE ENDS)";QB(I+1)
165 IF QB(I+1)<0 THEN GOTO 300
170 INPUT"       BASE YEAR PRICE                  ";PB(I+1)
180 INPUT"       CURRENT YEAR PRICE               ";PC(I+1)
190 I=I+1:GOTO 150
300 N=0:D=0
310 FOR J=1 TO I:N=N+PC(J)*QB(J):D=D+PB(J)*QB(J):NEXT
320 CLS
330 PRINT:PRINT
340 PRINT"THE LASPEYRES PRICE INDEX EQUALS ";N/D*100
350 PRINT:INPUT"PRESS ENTER FOR MORE";Z9$
355 IF Z9$ = "-1" THEN END
360 CLS:GOTO 140
