₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,083 members, 8,420,236 topics. Date: Thursday, 04 June 2026 at 02:18 PM

Toggle theme

I Need Assitance On Qbasic Programming Language - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingI Need Assitance On Qbasic Programming Language (1968 Views)

1 Reply (Go Down)

I Need Assitance On Qbasic Programming Language by nikky2011(op): 7:34pm On Jul 13, 2011
HI NAIRALANDER,
pls kindly assit me to write a basic programe using ARRAY,i was given as my assignment to summit dis wknd.
The question is,write a baic programe to prepare an invoice with the following details
a)customer names and date as string variable, (b)list of item as array of string value (c)list of their prices as an array of fixed point value (d)list of quantites as an array of integer value (e)print customer name and date,date print serial number,item unit price and quantity.
you can contact me on(08082716493) thanks in advance.
Re: I Need Assitance On Qbasic Programming Language by GoodMuyis(m): 8:59pm On Jul 16, 2011
Well if it is not too late on Monday i can give it a try but you will just accept it if it is too simple

OK undecided
Re: I Need Assitance On Qbasic Programming Language by GoodMuyis(m): 6:55pm On Jul 17, 2011
here is it test it on your interpreter to confirm its accuracy, but am sure its OK

But it may need some final touches from you if you want to


' This is a Q-basic Invoice program
' Written by: Your name here
'Date: 16-07-2011
'Time: 11:30PM


CLS

DIM item(1 TO 20) AS STRING

REM Lets collect user data

INPUT "Enter Customer Names: "; names$ REM is declared implicitely here
INPUT "Enter Transaction date: "; transdate$ REM transdate$ is declared implicitely here
INPUT "Please Enter Number of Item Purchase: "; c
PRINT

REM now lets use array to get other info, using FOR loop
total = 0
FOR i = 1 TO c
PRINT "Enter Details for Item"; i
PRINT
INPUT "Enter Item Name "; item(i)
INPUT "Enter the Unit Price of Item: "; unitPrice(i)
INPUT "Enter the Quantity of Item Bought: "; qty(i)

totalPrice(i) = unitPrice(i) * qty(i) REM Calculating for Item qty price
total = total + totalPrice(i) REM suming up the overall total price
PRINT
NEXT i

REM Printing Summary
CLS
PRINT "SOLA AND CO Business"
PRINT "======================================================="
PRINT " Customer Names: "; UCASE$(names$) REM UCASE is used to convert to Upper Case
PRINT " Transaction Date: "; transdate, , "Date Printed"; DATE$ REM DATE$ print the current date
PRINT " S/N: "
PRINT "======================================================="
PRINT "| |"; "ITEMS", "UNIT", "QTY", "AMOUNT"
PRINT "======================================================="

FOR i = 1 TO c
PRINT "|"; i; "| "; UCASE$(item(i)), "|"; unitPrice(i), "|"; qty(i), "|"; totalPrice(i), "|"
NEXT i
PRINT "======================================================="
PRINT "GRAND TOTAL: "; total
END

Regards
Re: I Need Assitance On Qbasic Programming Language by GoodMuyis(m): 11:35am On Jul 18, 2011
Thats it so test it am Make the Correction on on it


' This is a Q-basic Invoice program
' Written by: Your name here
'Date: 16-07-2011
'Time: 11:30PM


CLS

DIM item(1 TO 20) AS STRING

REM Lets collect user data

INPUT "Enter Customer Names: "; names$ REM is declared implicitely here
INPUT "Enter Transaction date: "; transdate$ REM transdate$ is declared implicitely here
INPUT "Please Enter Number of Item Purchase: "; c
PRINT

REM now lets use array to get other info, using FOR loop
total = 0
FOR i = 1 TO c
PRINT "Enter Details for Item"; i
PRINT
INPUT "Enter Item Name "; item(i)
INPUT "Enter the Unit Price of Item: "; unitPrice(i)
INPUT "Enter the Quantity of Item Bought: "; qty(i)

totalPrice(i) = unitPrice(i) * qty(i) REM Calculating for Item qty price
total = total + totalPrice(i) REM suming up the overall total price
PRINT
NEXT i

REM Printing Summary
CLS
PRINT "SOLA AND CO Business"
PRINT "======================================================="
PRINT " Customer Names: "; UCASE$(names$) REM UCASE is used to convert to Upper Case
PRINT " Transaction Date: "; transdate, , "Date Printed"; DATE$ REM DATE$ print the current date
PRINT " S/N: "
PRINT "======================================================="
PRINT "| |"; "ITEMS", "UNIT", "QTY", "AMOUNT"
PRINT "======================================================="

FOR i = 1 TO c
PRINT "|"; i; "| "; UCASE$(item(i)), "|"; unitPrice(i), "|"; qty(i), "|"; totalPrice(i), "|"
NEXT i
PRINT "======================================================="
PRINT "GRAND TOTAL: "; total
END


Re: I Need Assitance On Qbasic Programming Language by paule: 5:13pm On Jul 18, 2011
Wow!! so people can still write Qbasice code. its been a long time, VB.NET/C# all the way. una dey try sha cheesy
Re: I Need Assitance On Qbasic Programming Language by candylips(m): 8:02pm On Jul 18, 2011
QBasic shocked
1 Reply

Learn Qbasic Programming Language In 14 DaysI Need Assitance In Vb.net ProgrammingQbasic On Windows Xp234

I Need This Type Of Basic AppI Give Up... (help)I Want To Learn Hacking