Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Hi, I am running into an error with the sample invoice program I havewritten usi

ID: 3618357 • Letter: H

Question

Hi,

I am running into an error with the sample invoice program I havewritten using Liberty BASIC, as follows:

'Filename: RentReciept.bas
'Demonstrates INPUT by asking the use for several values
'for the landlord's invoice and prints a total of rent owed
Print "Realty Company"
'
Input "Name?"; Name
'Name has the words entered by the user
Name = John Ellis
'
Input "Amount?"; Amount
'Amount has the value entered by the use
Amount = 835
'
Input "Month?"; Month
Month = July
'
Input "Current Date?"; Current Date
'Current Date has the words and numbers entered by the user
Current Date = June 29, 2010
'
Input "Press Enter when you are ready for the invoice..."; ans
'
Pring "Name is"; Chr$(32); Name
Print "Amount is"; Chr$(32); Amount
Print "Month is"; Chr$(32); Month
Print "Current Date is"; Chr$(32); Current Date
'
Calculates and prints an invoice on the screen for the user
'
Print "Invoice from Realty Company"
'
Print "******************"
'
Print "Received from Name sum of Amount as rent for Month"
Print "Signed _____________________________"; Chr$(32); "CurrentDate"
'
End

**My problem is that I want "Name" and "Account", etc to be filledin at the bottom here by the actual INPUT (John Ellis, 835, June,etc) when I command the computer to "Print" the invoice, but as youcan see, it merely prints the generic information "Name","Account", etc.

Can anyone help me with this hurdle? My instructor is not giving meany support and the textbook is not sufficient.

Thanks!

Explanation / Answer

please rate - thanks you have everything in quotes I don't have BASIC to test it, and I'm not familiar with the Chr$command but make the following change to (this should at least giveyou an idea Print "Received from Name sum of Amount as rent forMonth"   change to Print "Received from ";Chr$(32); Name; " sum of ";Chr$(32);Amount; " as rent for " ;Chr$(32); Month in addition change Pring "Name is"; Chr$(32); Name to Print "Name is"; Chr$(32); Name

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote