We read your photo as:

Provide algorithms/pseudocode for finding the sum of non-negative numbers until a negative number is entered, computing sphere volume, and polishing shoes.

Computer Science

ScanSolve AI Answer

Step-by-step solution

27 steps

Here are the solutions to your assignments:

  1. Algorithm to find sum of given data values until a negative value is entered:
  1. Initialize SUM to 0.

  2. Read NUMBER.

  3. While NUMBER is greater than or equal to 0, do the following

        *   Add `NUMBER` to `SUM`.
        *   Read `NUMBER`.
    
  4. Print SUM.

  5. End.

    1. Algorithm to compute the volume of a sphere:
  6. Start.

  7. Define π=3.1416\pi = 3.1416.

  8. Read the RADIUS (r) of the sphere.

  9. Calculate the VOLUME (V) using the formula

        $$
        V = \frac{4}{3} \times \pi \times r^3
        $$
    
  10. Display the calculated VOLUME.

  11. End.

    **Flowchart Description for Volume of a Sphere:**
    *   **Start/End:** Oval shape.
    *   **Input:** Parallelogram (Read RADIUS).
    *   **Process:** Rectangle (Define $\pi = 3.1416$).
    *   **Process:** Rectangle (Calculate $V = \frac{4}{3} \times \pi \times r^3$).
    *   **Output:** Parallelogram (Display VOLUME).
    *   **Flow lines:** Arrows connecting the shapes in sequence.
    

    3. Pseudocode for polishing shoes:

  12. START

  13. GATHER shoes, brush, polish, and a soft cloth.

  14. OPTIONALLY, REMOVE laces.

  15. CLEAN shoes with the brush to remove dirt and dust.

  16. APPLY a small amount of polish onto the shoes using an applicator or cloth.

  17. RUB the polish into the leather using small circular motions.

  18. ALLOW the polish to dry for a few minutes.

  19. BUFF the shoes vigorously with a clean, soft cloth until they shine.

  20. OPTIONALLY, REPLACE laces.

  21. END

    1. Algorithm to classify a triangle based on its side lengths:
  22. Start.

  23. Read the three side lengths

    SIDE1, SIDE2, SIDE3.

  24. If SIDE1 = SIDE2 AND SIDE2 = SIDE3

        *   Print "**Equilateral Triangle**".
    
  25. Else If SIDE1 = SIDE2 OR SIDE1 = SIDE3 OR SIDE2 = SIDE3

        *   Print "**Isosceles Triangle**".
    
  26. Else

        *   Print "**Scalene Triangle**".
    
  27. End.

    1. Flowchart Description for buying stationery from the market:

      • Start: Oval.
      • Process: Rectangle (Make a list of stationery needed).
      • Decision: Diamond (Do I have enough money?).
        • If No: Process (Go to ATM).
        • If Yes: Process (Go to market).
      • Process: Rectangle (Buy stationery).
      • Process: Rectangle (Return home).
      • End: Oval.
      • Flow lines: Arrows connecting the shapes, with branches from the decision diamond.
    2. Flowchart Description for playing music stored in a CD:

      • Start: Oval.
      • Process: Rectangle (Turn on CD player/computer).
      • Process: Rectangle (Open CD tray).
      • Process: Rectangle (Insert CD).
      • Process: Rectangle (Close CD tray).
      • Decision: Diamond (Does music start automatically?).
        • If No: Process (Press Play button/Open media player).
      • Process: Rectangle (Adjust volume).
      • End: Oval.
      • Flow lines: Arrows connecting the shapes, with a branch from the decision diamond.
    3. Flowchart Description to accept two numbers and perform an operation:

      • Start: Oval.
      • Input: Parallelogram (Read NUMBER1, NUMBER2).
      • Decision: Diamond (Is NUMBER1 > NUMBER2?).
        • If Yes: Process (Calculate SUM = NUMBER1 + NUMBER2). Output (Print SUM).
        • If No: Process (Calculate PRODUCT = NUMBER1 * NUMBER2). Output (Print PRODUCT).
      • End: Oval.
      • Flow lines: Arrows connecting the shapes, with branches from the decision diamond merging before the End symbol.
Was this helpful?

Still stuck on this one?

Ask a follow-up, and the answer starts from this question.

Got a different question?Ask your own question
Handwritten step-by-step solution preview

Handwritten Step-by-Step Solution

Get this as a handwritten image on WhatsApp — like a tutor wrote it for you.

Try on WhatsApp