tags:

views:

193

answers:

2

I have payroll database, on my payroll payslip i would like to make money denominations for the salary of each employee, I.e if an employe has got 759 Dollar then the cashier wil withdraw 7 one hundreds ,1 Fifty Dolar, 9 ten dollars from a banck please give me a code in vb.net

Salary hundred Fifty ten

759 7 1 9

Please help me thans a lot

+1  A: 

Duplicate:

How can I convert an integer into its verbal representation?

How can I display money amounts in word form?

Python function: Find Change from purchase amount

Mitch Wheat
actually, maybe not an exact duplicate on re-reading...
Mitch Wheat
still sounds like homework though
gbjbaanb
A: 

Here's an answer in python:

# Target amount
amount = 759

# The denominations to be used, sorted
denoms = [100, 50, 20, 10, 5, 1]

# Take as many of each denomination as possible
for d in denoms:
  count = amount // d
  amount -= count * d
  print "%ix%i" % (count, d)

Sample output:

7x100
1x50
0x20
0x10
1x5
4x1