Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true

C Books Guide and List
C++ Books Guide and List
Best Java Books

0 votes
477 views
hello, i am learning qbasic for a class in high school. This is my senior year and i have an opportunity for an internship for a programming position but extended the date so i could learn more about coding using html , css, etc. ........Im getting off topic. Well i was working with my teacher and we were going over "sub" functions .

here is the question.

"Write a SUB procedure that determines the unit price (cents per ounce) of different boxes of laundry detergent. The input should include the weight in pounds and ounces as well as the total price. The output should state the price per ounce".


here is our code.

CLS

CALL GET.DATA

SUB GET.DATA (LBS,OZ,PRICE)
INPUT "PLEASE ENTER THE WEIGHT OF YOUR LAUNDRY DETERGENT IN POUNDS"; WLB
INPUT "PLEASE ENTER THE WEIGHT OF YOUR LAUNDRY DETERGENT IN OUNCES"; WOZ
INPUT "PLEASE ENTER THE TOTAL PRICE OF YOUR LAUNDRY DETERGENT"; PRICE

TOZ=(LZ*16)+WOZ

PPO = PRICE/TOZ

PRINT PPO


END SUB


The program tells me that theres an "expected ( on current line" for the line that contains"SUB GET.DATA (LBS,OZ,PRICE)"and we dont know how to fix it.........any help would be appreciated
asked by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.

Related questions

0 votes
1 answer 59 views
0 votes
1 answer 28 views
28 views asked by smith (15.3k points) 18 45 77
0 votes
1 answer 19 views
19 views asked by felin (8.4k points) 10 15 20
...