need help in remainder .

for example i have 99 cents and i need to calculate how many qtrs, nikels , dimes, pennies
Jakob Mall

Comments

  • : for example i have 99 cents and i need to calculate how many qtrs, nikels , dimes, pennies
    : Jakob Mall
    :

    If would know how many cents mean qtr, nikel, dime, penny...
    I suppose (but I don't know)
    qtrs = 25 cents
    nikels = 5 cents
    dimes = 2 cents
    penny = 1 cent
    [code]
    x = InputBox("Insert cents:")
    a =x 25
    x =x mod 25
    MsgBox a & " qtrs"
    a =x 5
    x =x mod 5
    MsgBox a & " nikels"
    a =x 2
    x =x mod 2
    MsgBox a & " dimes"
    MsgBox x & " cents"
    [/code]
    If you want ur program more handsome, use MsgBox like this:
    If a<>0 Then MsgBox a & " qtr" & IIf(a>1, "s", vbnullstring)


    [blue][b][italic][size=4]P[/size]avlin [size=4]II[/italic][/size][/b][/blue]

    [purple]Don't take life too seriously anyway you won't escape alive from it![/purple]


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion