Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,843 members, 7,810,254 topics. Date: Saturday, 27 April 2024 at 02:44 AM

I Need Assitance On Qbasic Programming Language - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / I Need Assitance On Qbasic Programming Language (1850 Views)

Learn Qbasic Programming Language In 14 Days / I Need Assitance In Vb.net Programming / Qbasic On Windows Xp (2) (3) (4)

(1) (Reply) (Go Down)

I Need Assitance On Qbasic Programming Language by nikky2011(f): 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)

Guess Nigerian Programmers Are Not Bad Afterall. This Sucker Got Beaten By One. / Write Script From Scratch Offer / Lets Talk About C#

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 17
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.