at abc corporation, the salesmen earn $10,000 base salary. this salary is supplemented by 10% commission of their gross sales. they are also paid an extra $500 if their gross sales is over $80,000. compare and output the amounts earned by each of these salespeople:
employee gross sales
heather knox $90,000
sam turbin $70,000
dan phillips $20,000
Robert Vance $95,000
Lew Wallace $40,000
print a paystub that will reflect the employee, name, gross sales, commission, and gross pay for each employee. you must use loops, trip-codes, read/data, formulas, and conditions. print out underline headings and center the output horizontally on the page. columns must be centered beneath each heading.
i took a programming class to see what it was like and i hate it, im just trying to finish it. without a good grade on this i will fail, this is not something i plan on continuing, its past the drop date and way past the refund date.
so if you guys could please just help me out that would be great, ill post some of my coding but its embarassing ive tried reading the book over and over and have so many notes but this is just not for me.
$ define a string (Text)
% define a integer (Numbers)
Below i have use as LONG, this is number over 32000 and something - others will know the exact
so try this:
DIM usrname AS STRING, basewage AS INTEGER, bonus AS INTEGER, totalwage AS LONG, sale AS LONG
'the dim statment classifes what your variables will be before the program starts
basewage = 10000
CLS ' clear the screen
LOCATE 3, 10 'goto this location on screen
INPUT "Enter employee name : ", usrname$'(you need to put either a , or a ; before the name$ - ; will place a question mark at the input line , wont.
LOOP UNTIL usrname$ > "" ' do the above until something is enter in the name box
LOCATE 5, 10
INPUT "Enter employee total sales : ", sale
LOOP UNTIL sale > 0
'know you'll need to figure out the bonus(if appllicable) and the commision wage
commision% = (sale / 100) * 10
IF sale > 80000 THEN bonus = 500 ELSE bonus% = 0
totalwage = (basewage + commision%) + bonus%
LOCATE 8, 10
PRINT usrname$, totalwage '(try changing the , to a ; - to see what it does inthe print statement.)