Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Creating java program  (Read 3433 times)

0 Members and 1 Guest are viewing this topic.

alyoob

    Topic Starter


    Intermediate

    Thanked: 1
    • Experience: Experienced
    • OS: Windows 8
    Creating java program
    « on: July 22, 2008, 08:27:13 AM »
    I need help creating a java program  that inputs an amount of cents, converts the input amount to dollars, quarters, dimes, nickels and pennies.
    Input the cents
    dollars = cents/100
    centsLeft = cents%100;
    quarters = centsLeft/25
    centsLeft = centsLeft%25
    dimes = .....
    Test your program with different inputs.
    « Last Edit: July 22, 2008, 09:05:47 AM by alyoob »

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: Creating java program
    « Reply #1 on: July 22, 2008, 11:18:59 PM »
     I don't recall java having a modulus operator, I'm not sure about javascript, though.

    You seem to have it- what exactly to you need help with?
    I was trying to dereference Null Pointers before it was cool.

    niraj.kumar



      Newbie

      Re: Creating java program
      « Reply #2 on: July 27, 2008, 01:08:37 AM »
      Its a straigth forward program ... .wat u want .... whole program
      If you are facing any problem then let me .. please post error msg

      BC_Programmer


        Mastermind
      • Typing is no substitute for thinking.
      • Thanked: 1140
        • Yes
        • Yes
        • BC-Programming.com
      • Certifications: List
      • Computer: Specs
      • Experience: Beginner
      • OS: Windows 11
      Re: Creating java program
      « Reply #3 on: July 27, 2008, 08:49:16 AM »
      I need help creating a java program  that inputs an amount of cents, converts the input amount to dollars, quarters, dimes, nickels and pennies.
      Input the cents
      dollars = cents/100
      centsLeft = cents%100;
      quarters = centsLeft/25
      centsLeft = centsLeft%25
      dimes = .....
      Test your program with different inputs.

      I didn't provide any code straight-up because this kind of looks like homework.
      I was trying to dereference Null Pointers before it was cool.

      qinghao



        Intermediate
      • Don't think your self special
        Re: Creating java program
        « Reply #4 on: August 18, 2008, 01:51:12 PM »
        Quote
        looks like homework.
        I agree with BC_Programmer

        Quote
        I need help creating a java program  that inputs an amount of cents, converts the input amount to dollars, quarters, dimes, nickels and pennies.
        alyoob !
        Do you think this program only need simple calculate and simple input and output?All of these can be found in Textbooks.

        I advise you to read your Textbooks throughout . ;)