GeoCitesSites.com

Problem # 7 : Two strings in a spiral

Write a SUB-routine SPIRAL which takes two strings S1$ and S2$ and an integer L and prints them spirally on the screen.

The spiral should start at the top-left corner of the screen and the first edge would be of length L. The pattern should repeat S1$ for horizontal lines and S2$ for vertical lines.

Also letters at the corners should be common to both strings and if this is not possible then the second string should start with the first letter.

Sample Output
1) CALL SPIRAL("GANDHI" MODERN-SCHOOL 10)

 
[Sample Output]

2) CALL SPIRAL("MODERN-SCHOOL" GANDHI 6)

 
[Sample Output]

Previous Problem
Return to problems at The Vault
(Back to problems at The Vault )
Next Problem