If you are a photographer, you may know how daunting it is to take large group photos. It's not a matter of simply adjusting your camera's settings based on lighting and field of view.
The positioning of the group is just as important. Whether it be a football team or a graduating class, a good group photo usually has these 2 layouts:
(1) Same number of people each row
X-X-X-X-X-X
-X-X-X-X-X-X
X-X-X-X-X-X
-X-X-X-X-X-X
OR
(2) Number of people each row alternates
X-X-X-X-X-X
-O-O-O-O-O-
X-X-X-X-X-X
-O-O-O-O-O-
Ideally, each row would have a different elevation (provided by either stairsteps or bleachers). It is also preferred that each row of people alternates a step so that each person's head is equally between the shoulders of the two people directly in the row behind them.
This program. It serves to display the best symmetrical formation a given group of people can take.
Input: Total number of people in group
Output: Patterns showing number of people in each row, ASCII representations of each pattern
Ex: Input: 20 ... Output: 4 rows of 5 (each row is offset by 1 step)
O-O-O-O-O
-O-O-O-O-O
O-O-O-O-O
-O-O-O-O-O
OR
O-O-O-O
-O-O-O-O
O-O-O-O
-O-O-O-O
O-O-O-O
Joseph Peery - @CodingJoseph Jacob Moellenbeck - @_