| |||||||||||||||
|
|
![]() CHAPTER 6 EXERCISE SOLUTIONS The solutions to the exercises could be written this way:
Since the service number heading is longer than the data, your spacing may be one (1) or two (2) spaces different from the one shown, depending on how you choose to arrange the odd number of spaces.
Positioning of the output data in the output line is left to your discretion. The primary concern is that you know how to construct the image statement and perform the rounding function.3. 10 LET Y = .01
4. 10 REM THIS PROGRAM GIVES THE DISCOUNTED ##% 60 PRINT USING 70 70 % ITEM PRICE 80 FOR X = 1 TO 4 90 READ I$(X),U(x) 100 LET P = U(X) – (U(X)*D) 110 PRINT USING 120, I$(X),P + .005 120 %########## $#,###.## 130 NEXT X 200 DATA "TIRES",379.95,"BATTERY",61.95 210 DATA "ENGINE",1032.50,"FUSES",.55 900 END RUN ENTER DISCOUNT RATE,.XX ?.10 DISCOUNTED PRICES AT 10% ITEM PRICE TIRES $341.96 BATTERY $55.76 ENGINE $929.25 FUSES $0.50 |
|
Privacy Statement - Press Release - Copyright Information. - Contact Us - Support Integrated Publishing |