title: Trouble with pseudocode and integrating methods
body: <p>Create the logic for a program that continuously prompts the user for a numeric value until the user enters 0. The application passes the value in turn to a method that computes the sum of all the whole numbers from 1 up to and including the entered numbers, and to a method that computes the product of all the whole numbers up to and including the entered number.</p>
  
  <p>So far, this is what I have:</p>
  
  <pre><code>BEGIN
    MAIN MODULE BEGIN
      Declare enteredNumber as Integer
      Do While (enteredNumber != 0)
      DISPLAY "Enter a positive number (0-EXIT) : "
      input enteredNumber
      sumModule(enteredNumber)
        OUTPUT enteredNumber
      productModule(enteredNumber)
        OUTPUT enteredNumber
      EndWhile
    END MAIN MODULE
  
  sumModule(enteredNumber)
    IF enteredNumber = 1 THEN
      RETURN 1
    ELSE
      RETURN enteredNumber + sumModule(enteredNumber - 1)
  
  productModule(enteredNumber)
    IF enteredNumber = 1 THEN
      RETURN 1
    ELSE
      RETURN enteredNumber * productModule(enteredNumber -1)
  </code></pre>