--- title: "Unit Pricer" id: 76663 type: "computer_media" slug: "unit-pricer" url: "http://localhost/computer_media/unit-pricer/" markdown_url: "http://localhost/computer_media/unit-pricer.md" published_at: "2026-11-11T08:02:10+00:00" modified_at: "2026-11-11T08:02:10+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/unit-pricer-1.png" excerpt: "Which is the better buy? Enter the price and size of two products and the ZX81 works out the cost per unit of each." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "Stephen Zachev" slug: "stephen-zachev" taxonomy: "indiv" url: "http://localhost/indiv/stephen-zachev/" genre: - name: "Home" slug: "home" taxonomy: "genre" url: "http://localhost/type/home/" media_type: "Program" programmers: - name: "Stephen Zachev" slug: "stephen-zachev" taxonomy: "indiv" url: "http://localhost/indiv/stephen-zachev/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Unit%20Pricer%20%281982%29%28Zachev%2C%20Stephen%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1982" images: - url: "http://localhost/wp-content/uploads/2026/11/unit-pricer-1.png" - url: "http://localhost/wp-content/uploads/2026/11/unit-pricer-2.png" article_media: - id: 19345 title: "Unit Pricer" type: "article" url: "http://localhost/article/unit-pricer/" related_content: - id: 19351 title: "Syntax Errors" type: "article" url: "http://localhost/article/syntax-errors-5/" media_type_tags: "Home" license: false --- # Unit Pricer Enter the cost of the first product and its number of units, then the same for the second. The program prints the cost per unit of each in cents and says which product is the better buy. As printed, two line numbers are misprinted (84 for 20 and 4241 for 145), and when the products are equally priced the program goes on to print the wrong message too. The November 1982 Syntax Errors column corrected the line numbers and added 350 STOP. The download has the program as printed and corrected. Line 170 prints ?UY for BUY, as printed. The heading says 8K ROM, 2K RAM. Published in Syntax October 1982 ([Unit Pricer](https://timexsinclair.com/article/unit-pricer/)). ## Source Code ``` 5 REM UP 10 PRINT "THIS PROGRAM COMPARES PRODUCTS A AND B BASED ON UNIT PRICE" 25 PRINT 30 PRINT "HOW MUCH DOES ";A$;" COST" 35 INPUT A 36 PRINT 37 PRINT "HOW MANY UNITS IN PRODCT A" 40 INPUT B 50 LET B$="SECOND PRODUCT" 52 PRINT 55 PRINT "HOW MUCH DOES ";B$;" COST" 60 INPUT C 62 PRINT 65 PRINT "HOW MANY UNITS IN PRODUCT B" 70 INPUT D 80 CLS 84 LET A$="FIRST PRODUCT" 90 LET E=A/B 100 LET F=C/D 110 LET E=E*100 120 LET F=F*100 130 PRINT A$;"=";E;" CENTS PER UNIT" 135 PRINT 140 PRINT B$;"=";F;" CENTS PER UNIT" 150 IF E