Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Programming in C/VB

Status
Not open for further replies.
Is anyone here skilled in coding? If so, I need a little dos app made. I dont mind PayPal'ing you some money, because Ive tried and cant do it on my own (just terrible at learning to code). Anyone want to take me up on the offer?
 
I live on a farm, and my mom does the payroll for us. Basically, this is for her. I (she) needs to enter a dollar amount (lets say $512.54) and have it split up into hundreds, fiftys, twentys, tens, fives, toonies, loonies, quarters, dimes, nickels, and pennies. Basically a spreadsheet type thing, but this has to be done for twenty or so people, so it should look something like this:
Name...Amount...100's...50's...20's...10's...5's...2's...1's...25c...10c...5c...1c
blah......512.54....5........0......0.......1......0.....1.....0.....2.......0......0.....4
blah2.....512.53...5........0.......0.......1......0.....1....0......2......0.......0.....3
total..................10.......0......0........2......0.....2....0......4.....0.......0......7

and have it total up the number of bills at the bottom.
 
Because once we get the total amounts that each worker earns, we have to go to the bank and say 'we need x amount of .25's, x amount of .10's.' etc. Why would you give someone five dimes when you can give them two quarters?
 
ParkingLotLust said:
Do you have a link to a free one? I looked for a long time and couldnt find one.

I can't say I've ever looked for one?, but I would suggest you really need to pay for one - and one specific for your countries regulations, it should make wages much simpler for you.

The only one I've ever used was an old version of Sage, actually running on an Amstrad PCW (with 3 inch floppy drive), I set it up for a small local transport company.
 
Regulations? All it needs to do is say $ = this many bills. Doesnt have to calculate taxes or anything; we already use something similar to Quicken for that.
 
Hmm now that I think about it... what about a simple spreadsheet? That would have everything lined up already and solves the printing step. What would I use for a formula, or even just the general idea? (I have limited experience with spreadsheets)
 
This is not very hard to do.Just keep dividing it and always divide whats left of the first dividing.Writing such a problem is easy.Well etlest i know how to do it in VB.
 
As suggested, it's simple, to do, something like this:

Code:
While Wages > 2000
    Inc(20pounds)
    Wages = Wages - 2000
Wend

While Wages > 1000
    Inc(10pounds)
    Wages = Wages - 1000
Wend

While Wages > 500
    Inc(5pounds)
    Wages = Wages - 500
Wend

While Wages > 100
    Inc(1pounds)
    Wages = Wages - 100
Wend

While Wages > 50
    Inc(50pence)
    Wages = Wages - 50
Wend

Then just carry on for the rest of the coins!. Notice I used all penny values, DON'T EVER use floating point for money calculations, always use integers and the values in pennies.
 
nothing like Excel
 

Attachments

  • Spreadsheet.zip
    9.2 KB · Views: 222
Works 99.9% perfectly. The only problem is when you use something like $190.10, it gives you a nickel and five pennies. How would you make it just give you a dime? Attached is the spreadsheet (I changed it a bit to include toonies, and to total up the number of bills)
 

Attachments

  • Payroll Spreadsheet v2.zip
    5.1 KB · Views: 255
So, you no longer need a program? If you still want an MS-DOS version of it, i will give it a go. The only problem is, it won't work on an NTFS hard drive. For some reason dos just doesn't like newer technology?
 
Nope, dont need a program. The spreadsheet approach works perfectly, with the exception of that little flaw I asked for help for above. Also, none of our computers run FAT32 or FAT16 so we'd have to run an emulated environment or boot dos from a floppy, which isnt good, since my parents have a hard time using their email account.
 
Nope, dont need a program. The spreadsheet approach works perfectly, with the exception of that little flaw I asked for help for above. Also, none of our computers run FAT32 or FAT16 so we'd have to run an emulated environment or boot dos from a floppy, which isnt good, since my parents have a hard time using their email account.

Ok. Yes, that does sound like parrents to me. Lol. Although Dos and FATxx are outdated, i still think they are one of the most stable operating evironments. In my opinion, i think DOS 5/6, Win98se, and WinXP are the most stable OS's ever made. I can't wait to see Vista!
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top