Search:

Type: Posts; User: Norm

Search: Search took 0.10 seconds.

  1. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    Can you explain what "the condition" is you are talking about? And why it is always going to be true.
  2. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    Do the same as these:

    ...donationQuantity=0, maxDonation=0 ...
  3. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    highestDonation=newDonation;
    That sets highestDonation to the value of newDonation changing the old value of highestDonation.
    Then the next statement:

    if(newDonation>highestDonation)
    can...
  4. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    What value will it hold?
  5. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    What data is the currentDonation variable supposed to hold?
    If you don't have any use for it, get rid of it.
  6. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    Have you defined what each of those three variables will hold?
    What's the difference between new and current?
  7. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    Take a look at that. Does it look correct? It changes the value of newdonation.

    What value is in currentDonation? Is that the correct variable?

    You need to define in English what each of...
  8. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    Suppose you can determine that the new donation is bigger than the current biggest donation:
    What should be done now that the code has found the new donation is more than the current biggest...
  9. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    How would you detect if the new donation is more than the current biggest donation?
    Then what?
  10. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    Step 1. should be broken down into separate, very simple steps. Each step should fit on a line.
    For example:
    initialize total and highest
    begin loop
    ask user for name
    read name and save
    ask...
  11. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    Try making the list of steps the program needs to do to solve the problem. When you have the list of steps, then worry about how to code it.
  12. Thread: Do While Loop

    by Norm
    Replies
    29
    Views
    2,480

    Re: Do While Loop

    Have you tried to think how to program this problem? What steps must the code take to do what you want it to do?
    Try making a list of the steps and if you have problems, post the list and the...
Results 1 to 12 of 12