1. ## Help with Qbasic PLEASE!

You have been given an algorithm that will prompt a terminal operator for the price of an article and a pricing code. Your program is then to calculate a discount rate according to the pricing code and print to the screen the original price of the article, the discount amount and the new discounted price. Calculate the pricing code and accompanying discount amount as follows:
Pricing code
Discount rate
H
50%
F
40%
T
33%
Q
25%
Z
0%
If the pricing code is Z, then the words ‘No discount’ are to be printed on the screen. If the pricing code is not H, F, T, Q or Z then the words ‘Invalid pricing code’ are to be printed.

HERE IS THE PSEUDOCODE:
B Solution algorithm
Calculate_discounted_price
1 Prompt for price, pricing_code
2 Get price, pricing_code
3 set message to blank
4 set discount_amount, new_price to zero
5 CASE OF pricing_code
H : discount_amount = price * 0.5
F : discount_amount = price * 0.4
T : discount_amount = price * 0.33
Q : discount_amount = price * 0.25
Z : message = ‘No discount’
other: message = ‘Invalid pricing code’
ENDCASE
6 IF message = blank THEN
new_price = price - discount_amount
Display price, discount_amount, new_price
ELSE
Display price, pricing_code, message
ENDIF
END

2. ## nothing to do with my computer right turn Clyde

Mydol/ Pamprin time

3. a) this is an forum for people with spinal cord injuries

and

and

c) Qbasic? What are you taking a class from 2000?

4. ## Mr./Ms. negative / having a pity party for myself

I'm done with the problem but it will not run. I don't know where my error is. This isn't homework and Qbasic is still used to develop applications. If you can't help be negative somewhere else and I'm sorry you have a spinal injury but I hope you cheer up. I posted in the Computer section and FYI people with spinal injuries use computers

5. You do need to DIM your variables...

6. Originally Posted by Tray
I posted in the Computer section and FYI people with spinal injuries use computers
I think you would get more answers in an actual computer programming forum. Like you were told, this is just a sub forum of a sci site.

I guess it is like I were to ask for cookie recipes on a computer site? Yes, you eat cookies, but .....
yes, you need to dim your variables first.

It sure strikes me as an assignment. the way it was written is the way assignments are written, certainly not the way I was given a job as a programmer.

So double shame for lying about it. Man up!

7. pm me...i'll help if i can...

8. This is the computers forum, but I can't help. Using BASIC or Microsoft is like going back to wearing nappies. Its just not right. I have real aversion. Is BASIC Turing complete? I.e. general purpose. I only remember being snookered by it every time I tried.

I remember a bit of BusinessBASIC, but that is a dialect of FORTRAN for COBOL applications written by PASCAL programmers. Know about FORTRAN, LISP and C.

9. Originally Posted by Tray
I'm done with the problem but it will not run. I don't know where my error is. This isn't homework and Qbasic is still used to develop applications. If you can't help be negative somewhere else and I'm sorry you have a spinal injury but I hope you cheer up. I posted in the Computer section and FYI people with spinal injuries use computers
Lol, I just read this. No wonder you can't figure out such a simple programming problem, you are an idiot.

10. Originally Posted by willingtocope
You do need to DIM your variables...
Ah, So BASIC is a 3.5 GL! Auto some times, promote some times, work some times. You have to declare arrays in Bash too. I use full 4GLs like Unix shell and friends. Use it the same way I used to use LISP. See my Unix shell entry in http://en.wikipedia.org/wiki/Complem...ming_languages Unix shell is also the basis of some NoSQL with look, join, etc. Unix V7: Nothing new under the Sun or on the Sun.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•