CrazyEngineers
  • how to find the amount of cashback in payment using dr racket?

    Aruwin

    Aruwin

    @aruwin-WQ7eeu
    Updated: Jun 15, 2011
    Views: 1.1K
    I am learning about scheme programming now but I do not how to.can someone tell me what is wrong with this?
    Capture
    0
    Replies
Howdy guest!
Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a member of our community. Consider creating an account or login.
Replies
  • hexreader

    MemberJun 15, 2011

    I know nothing about the program that you are using, but....

    Did you really mean to do a subtraction every time you write "cash-back" ?

    I suspect you should be using a variable named maybe "cashback" or "cash_back"

    Just guessing...
    Are you sure? This action cannot be undone.
    Cancel
  • Aruwin

    MemberJun 15, 2011

    hexreader
    I know nothing about the program that you are using, but....

    Did you really mean to do a subtraction every time you write "cash-back" ?

    I suspect you should be using a variable named maybe "cashback" or "cash_back"

    Just guessing...
    the question is to define find the amount of cash-back.
    (define (cash-back payment).......)
    rate of cashback:
    (a)first 50000yen is 0.0025
    (b) >50000yen,100000yenportion (50000<payment<=150000) is 0.005
    (c)>150000yen,100000yen portion(150000<payment<=250000) is 0.0075
    (d)>250000yen is 0.01

    how do i write these in scheme for the payment 300000 yen?
    Are you sure? This action cannot be undone.
    Cancel
  • hexreader

    MemberJun 15, 2011

    Sorry, but I know nothing about "scheme" and I cannot help further.

    Please do not PM me with your homework. Use the Forum.
    Are you sure? This action cannot be undone.
    Cancel
  • PraveenKumar Purushothaman

    MemberJun 28, 2011

    Try substituting the * by a number. Possibly 1, and you might get the result working..
    Are you sure? This action cannot be undone.
    Cancel
Home Channels Search Login Register