Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 4 of 4

Thread: Im having big trouble with making a code with loops and if statement before big test!

  1. #1
    Junior Member
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Im having big trouble with making a code with loops and if statement before big test!

    Hi. My teacher gave us our final program to make, yesterday, and it's 20% of our mark. It's like a big test. I am really bad at computer science and i have 55% in her class, but i want to pass it because i need the credit to graduate, and it has to be done by tommorow by the end of class. This is really hard for me, as I have tried to do it by reading the question over and over again, and reading my booklet, that she gave us at the begging of the year. She is a really bad teacher and doesn't teach us anything, so everybody has bad marks in her class. Please somebody help me write the code for that program because it's going to be really bad for me not to graduate.PLEASE SOMEBODY HELP FAST! In advance Thank you . So the question on the assignment is:

    Task: Write a program that produce the coins needed to make up the amount of money a user inputs. Input to the program should be a positive integer representing an amount of money in cents. Output should be the amount of money along with how it would be made up in coins( toonies(2 dollars), loonies(1 dollar), quarters(25 cents), dimes(10 cents), nickels(5 cents), pennies(1 cent) that could make up that amount(use the largest coin values first, the move down to smaller coin values as needed). In printing the results, the program should print results in a reasonable, organized and communicative way. Also, the user should be given prompts so that they know what to enter.

    Sample input: Enter the number of cents 558
    Sample output: 2 toonie(s), 1 loonie(s), 2 quarter(s), 0 dime(s), 1 nickel(s), 3 pennie(s)


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Im having big trouble with making a code with loops and if statement before big test!

    Do you have any specific questions about your assignment?
    Please post your code and any questions about problems you are having.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Junior Member
    Join Date
    Jan 2013
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Im having big trouble with making a code with loops and if statement before big test!

    Thank you for replying Norm! The problem is that i have no idea how to do the code for this program. I started it with all the things I need like Scanner, variables etc. but then I can't do the rest with loops and if statements and things like that.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Im having big trouble with making a code with loops and if statement before big test!

    Do the program in small steps. Write some of the code for what you know how to do, compile it and test it. Fix the problems, compile and test again. Continue until that small part works, then try to add one more small part using the same small steps.

    When you get to a part you are having problems with, post the code and a description of your problems.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. Replies: 2
    Last Post: September 28th, 2012, 08:19 AM
  2. Replies: 2
    Last Post: September 28th, 2012, 08:19 AM
  3. Hello friends, I'm in big trouble with this programme if anyone can help me out?
    By rockworld777 in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 28th, 2012, 07:53 AM
  4. Hello friends, I'm in big trouble with this programme if anyone can help me out?
    By rockworld777 in forum Loops & Control Statements
    Replies: 5
    Last Post: September 28th, 2012, 07:20 AM
  5. Small problem in big code, not sure why
    By diesal11 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: October 16th, 2011, 10:25 AM

Tags for this Thread