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.
Is this for QB code? QB cannot underline to my knowledge.
You can create a text file with a format using PRINT #, USING. Look up the way to format a line of text in PRINT USING help. VB uses Format to do that.
If you really need to print it, use SHELL if you use a USB printer:
SHELL "START Notepad /p homework.txt"
Add "CMD /C " first in XP or NT.
Ted
Perhaps you is confused...
This message has been edited by burger2227 on Dec 4, 2009 11:27 PM
Converting text coordinates to graphic coordinates
December 5 2009, 4:36 PM
SCREEN 12 uses text block sizes of 8 pixel columns by 16 pixel rows normally.
GraphicRow = (Textrow - 1) * 16 ' this gives you the top pixel of the row.
GraphicCol = (TextCol - 1) * 8 ' starting pixel
UnderlineRow = GraphicRow + 15 ' bottom of text row where most letter characters are not placed. Use the start position to draw the line going 8 pixels for each character using LEN of text.
Ted
PS: Single underline is CHR$(196), but now you are double spacing rows.
This message has been edited by burger2227 on Dec 5, 2009 9:18 PM This message has been edited by burger2227 on Dec 5, 2009 4:39 PM
$ 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
number
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
DO
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
DO
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.)
salesmen earn $10,000 base salary. this salary is supplemented by 10% commission of their gross sales.
employee gross sales
heather knox $90,000
sam turbin $70,000
dan phillips $20,000
Robert Vance $95,000
Lew Wallace $40,000
therefore, wouldnt the commision be based just against the gross sales, the $10000 is there wether you sell anything or not...i am not posistive, but thats what my brain is telling me....UNSEEN