Formula

 BBS: Inland Empire Archive
Date: 06-30-92 (06:30)             Number: 1917
From: RICHARD VANNOY               Refer#: NONE
  To: JIM TANNER                    Recvd: NO  
Subj: Formula                        Conf: (2) Quik_Bas
JT>Cost ...... $1.50
JT>MarkUp .... 30%
JT>Price ..... $...

Sure, four or five ways come to mind.

   Markup! = .30
   INPUT "Enter the cost: ";Cost!

   then either..

1. Retail! = Cost! + (Cost! * Markup!)

   or

2. Retail! = Cost! * (1 + Markup!)

or then again...

3. Markup! = 1.30
   Retail! = Cost! * Markup!

or if the markup changes a lot...

4. INPUT "  Enter the cost: ";Cost!
   INPUT "Enter the markup: example: .30 ";Markup!
   PRINT "Retail is $";Cost! * (1 + Markup!)

or to not input a decimal for markup..

5. INPUT "Enter the Markup percent: example 30 ";Markup!
   PRINT "Retail is $";Cost * (1 + (Markup! / 100))

The real "secret" is to add 1 to the markup percentage in
the multiply.
___
> MegaMail 2.1b #0:640K = 4480K in Dog Bytes

--- Maximus 2.00
 * Origin: D.J.M.BBS (1:202/307)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET