Results 1 to 4 of 4
  1. #1
    511prs is offline Member
    Join Date
    Aug 2012
    Posts
    6
    Rep Power
    0

    Default Solving the parking lot fees problem with java

    hi there, I need to solve this:

    In a parking they charge 5$ for the first 3 hours and for each extra hour you'll be charge 1$ and 24 hrs is 12$ but in here you can stay more than 24 hours, I don't know how to solve the hours>24 like 37 hours, any help ??


    thanks

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Solving the parking lot fees problem with java

    Look into using the mod operator, %, and int division, /.

  3. #3
    511prs is offline Member
    Join Date
    Aug 2012
    Posts
    6
    Rep Power
    0

    Default Re: Solving the parking lot fees problem with java

    But I need like the ecuation for the +24 because I have to charge 12 by day and 1 per extra hour, an example if the car stays there 37 hours what ecuation could I use to calculate the fees and put them in the program

  4. #4
    srinivas321 is offline Member
    Join Date
    Sep 2012
    Posts
    2
    Rep Power
    0

    Default Re: Solving the parking lot fees problem with java

    First get the total no of hours..write one if condition then %24 then calculate dollers

Similar Threads

  1. Solving a SALARY and TAX.... HAVE A PROBLEM ;(
    By irnie1994 in forum JCreator
    Replies: 5
    Last Post: 01-10-2012, 01:51 PM
  2. Cerification Fees
    By ananddevaraj in forum Jobs Discussion
    Replies: 1
    Last Post: 02-16-2011, 06:01 AM
  3. I need help solving this problem.
    By Felicia in forum New To Java
    Replies: 5
    Last Post: 03-04-2010, 09:40 PM
  4. Solving this equations problem in Java
    By matt_well in forum New To Java
    Replies: 17
    Last Post: 08-30-2008, 10:05 PM
  5. Suggestions required for solving a Java problem
    By bilal_ali_java in forum Advanced Java
    Replies: 3
    Last Post: 08-16-2008, 02:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •