# can you help me please?

December 4 2009 at 9:00 PM

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.

cheers

 Respond to this message

R

# A little....

December 4 2009, 9:42 PM
 For the formula i would.... wage% = 10000 commision% = (total sales /100)*10 if totalsales% > 80000 then bonus% = 500 else bonus% = 0 totalpay% = wage% + commision% + bonus% other than that i am of little use...UNSEEN
 Respond to this message

# thanks

December 4 2009, 10:50 PM
 thanks, i appreciate the help i had something totally different that wasnt running, im frickin horrible at this, logics are not for me.
 Respond to this message

R

# * HOMEWORK! YOU LOSE! Post your code attempt if you NEED help!

December 4 2009, 9:55 PM

 This message has been edited by burger2227 on Dec 4, 2009 10:28 PMThis message has been edited by burger2227 on Dec 4, 2009 10:01 PM

 Respond to this message

# lol yes but....

December 4 2009, 10:47 PM
 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. i also need a flowchart which im even worse at!
 Respond to this message

R

# Actually you lost me at "PRINT a paystub" LOL.

December 4 2009, 11:14 PM

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:

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

 Respond to this message
UnseenMachine
R

# You could

December 5 2009, 7:01 AM
 FOR UNDERLINING TXT ON SCREEN... Use PRINT to show the txt and the DRAW a LINE in the right screen locations? SCREEN 12 CLS LOCATE 4, 10 PRINT "UNDERLINED?" PSET (72, 61): DRAW "R86" As for on a receipt stub, try the following, but to actually print it you will have to change the PRINT command. SCREEN 12 CLS LOCATE 4, 10 PRINT "UNDERLINED?" LOCATE 5, 10 'PRINT "๐๐๐๐๐๐๐๐๐๐๐"'ASCII CODE 240 -TRIPLE UNDERLINE OR 'PRINT "อออออออออออ"'ASCII CODE 205 - DOUBLE UNDERLINE ....UNSEEN
 Respond to this message

R

# 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 PMThis message has been edited by burger2227 on Dec 5, 2009 4:39 PM

 Respond to this message

# will post coding.....

December 5 2009, 7:59 PM
 ill post you my coding but it probably wont make anysense it probably wont even run because im terrible at this. you guys have to promise to help!!!! :D
 Respond to this message

# ha ya laugh it up heres my attempt

December 5 2009, 8:36 PM
 cls rem idk wtf im doing what are \$, ;, and % used for? idk when to use them or what they are for rem this sux read names\$, salary print names, salary if salary > 80000 then bonus =500 else= 0 rem dont know what to put to make salary formula, dont know what to put to organize, idk why im even trying to do this becuase this is hopeless for me salary = gross sales * .1 + 10000 data heather knox, 90000 data sam turbin, 70000 data dan phillips, 20000 data robert vance, 95000 data lew wallace, 40000 ya thats about all i got im laughing at myself. my teacher pretty much wants it too look like this employee gross sales commission gross pay heather knox 90000 sam turbin 70000 dan phillips 20000 robert vance 95000 lew wallace 40000 with employee, gross sales, commission, and gross pay underlined centered output horizontally and the columns must be centered underneath each heading
 Respond to this message
UnseenMachine

# Ok..a little help

December 6 2009, 6:12 AM
 \$ 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.) it limited but should give you an idea... UNSEEN
 Respond to this message

R

# Calculating the gross sales

December 6 2009, 4:00 PM
 Say an employee earns 80,000. Subtract 10,000 because that is the base salary of each employee. So now you have 70000 as commission. The commission is only 10% (1/10) of the sales. So multiply 70K * 10 to get the total sales. Don't forget to add 500 to the gross wages on the paystub if sales are over 80,000. You should be able to figure out the code needed. Print the results to the screen until you get the proper results. Then you could format the data in a file with PRINT #n, USING. Ted PS: Do these people work for Sears or what?
 Respond to this message
UnseenMachine

# Are you sure

December 6 2009, 4:23 PM
 The first post states... 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
 Respond to this message

R

December 6 2009, 4:29 PM

OK, based on gross sales as the data, it calculates like this:

Take 10% of the gross sales as the commision. IE Divide by 10:

Commission = GrossSales / 10 ' or multiply by .1

CONST BaseSalary = 10000

IF GrossSales > 80000 THEN Bonus = 500 ELSE Bonus = 0

GrossWages = BaseSalary + Commission + Bonus

I don't think Mike is paying attention anymore anyhow and I'm tired of dancing around this.

 This message has been edited by burger2227 on Dec 6, 2009 4:50 PM

 Respond to this message
UnseenMachine

December 6 2009, 4:55 PM
 Cool though....can you help me? My account is apparently locked?....UNSEEN
 Respond to this message