108k views
3 votes
Create a flowchart for a program that calculates and displays the perimeter of a square using the following rules:

1. Allow a length to be entered.
2. If the length is valid, the display shows "Length is ACCEPTABLE.
3. If an invalid length (e.g., -3) is entered, the display shows "INCORRECT LENGTH ENTERED.

User Kumar Alok
by
7.1k points

1 Answer

1 vote

Final answer:

To create a flowchart for calculating the perimeter of a square, start by prompting for the length of the square. If the length is valid, display 'Length is ACCEPTABLE', otherwise display 'INCORRECT LENGTH ENTERED'. Calculate the perimeter by multiplying the length by 4 and then display the perimeter.

Step-by-step explanation:

Flowchart for Calculating Square Perimeter

  1. Start
  2. Prompt for the length of the square
  3. If the length is valid, display 'Length is ACCEPTABLE'
  4. If the length is invalid, display 'INCORRECT LENGTH ENTERED'
  5. Calculate the perimeter by multiplying the length by 4
  6. Display the perimeter
  7. End

User Erik I
by
7.6k points