user
Write an algorithm to calculate the perimeter of a rectangle.


assistant
Algorithm: 
1. Start 
2. Declare variables length, width, perimeter 
3. Read length, width 
4. Calculate perimeter as length + width + length + width 
5. Print perimeter 
6. End