[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 264: mysqli_fetch_assoc(): Couldn't fetch mysqli_result
[phpBB Debug] PHP Warning: in file [ROOT]/phpbb/db/driver/mysqli.php on line 326: mysqli_free_result(): Couldn't fetch mysqli_result
Pete's QBASIC Site Discuss QBasic, Freebasic, QB64 and more 2019-04-03T14:34:47-05:00 http://www.petesqbsite.com/phpBB3/app.php/feed/topic/10263 2019-04-03T14:34:47-05:00 2019-04-03T14:34:47-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=33582#p33582 <![CDATA[Re: Receiving Syntax error on homework (Code included)]]>
http://petesqbsite.com/phpBB3/viewtopic.php?f=1&t=3448

Statistics: Posted by Jack002 — Wed Apr 03, 2019 2:34 pm


]]>
2019-04-03T14:31:32-05:00 2019-04-03T14:31:32-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=33581#p33581 <![CDATA[Re: Receiving Syntax error on homework (Code included)]]> Statistics: Posted by Jack002 — Wed Apr 03, 2019 2:31 pm


]]>
2019-03-22T21:28:53-05:00 2019-03-22T21:28:53-05:00 http://www.petesqbsite.com/phpBB3/viewtopic.php?p=33529#p33529 <![CDATA[Receiving Syntax error on homework (Code included)]]>
This is the project question:

Write a program to create an inventory list for your collection of model cars using the top-down approach in planning, coding, and testing the program. Code the main module and the detail module, and create sub submodules for the initialization, title, headings, read, calculations, output, and totals.

The only total required is the total price of the collection.

Code:

' ***** Program Mainline *****CLSGOSUB InitializeVariablesGOSUB PrintHeadingsGOSUB ProcessDetailGOSUB PrintTotalsEND' ***** Initialize Variables *****InitializeVariables:T1$ = "          Model Car Collection"H1$ = "  Manufacturer #    Yr   Make    Model   Description                   Price  "D1$ = "\            ##\,     ##,  \     \, \     \, \                            \, ##.## " TL$ = "    Collection Total Value                                           ####.##"RETURN' ***** Print Headings ***PrintHeadings:PRINTPRINT T1$PRINTPRINT H1$PRINTPRINTRETURN' ***** Process Detail ***ProcessDetail: GOSUB ReadDataDO UNTIL Nam$ = "END"GOSUB CalculateAnswer    GOSUB PrintDetail    GOSUB ReadDataLOOPReturn'' ***** Read Input Data ****ReadData:READ Nam$, Yr, Make, Model, Description, PriceData BMR--R79, 49, FIAT, 500B, GILLETTE RAZOR, 7.99Data HOTWELS--34, 57, CHEVY, NOMAD, 4//DR STATION WAGON, 12.95 Data MATCHBX--878, 73, FORD, BRONC, 3//DR 4X4 RED SPARE WHL, 25.99Data MATCHBX--72, 69, BUIK, CENTY, YELLOW TAXI, 1.49Data BRM--R88, 34, BUGAT, TY575, RACER BLACK, 35.00Data MATCHBX--25, 80, LINCO, MRKIV, WHITE LIMOUSINE, 14.99Data Lesney--Y42, 82, CHEVY, MALBU, 4//DR GREEN PASSENGER, 1.99Data HASBRO--119, 75, AMC, GRMLN, 2//DR SEDAN YELLOW, 1.69Data TABY--6332, 71, TOYOT, CELIC, 2//DR SEDAN BLUE, 2.99Data BMR--SY238, 36, ROLRY, SYLVC, 4//DR SEDAN SILVER--GRAY, 60.00Data "End", 0Return'' ***** Calculate Answer *****CalculateAnswer:Let Totalcollec = Totalcollec + PriceReturn' ***** Print Detail *****PrintDetail:PRINT USING D1$; Nam$, Yr, Make, Model, Description, PriceRETURN' ***** Print Totals *****PrintTotals:PRINTPRINT USING TL$; TotalcollecPRINTRETURN' ***** End of Program *****

Statistics: Posted by QBasicin2019 — Fri Mar 22, 2019 9:28 pm


]]>