HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Repetition (Loops) > problem:


019. 50438 - Pattern with stars

Guest
• Review clarifications (2)

Volume problems

• 012. 50589 - The Number of Eggs Sold
• 015. 50466 - Drawing Square From...
• 016. 50463 - Drawing a Triangle
• 017. 50423 - Numbers square
• 017. 50537 - esreveR Triangle
• 018. 50344 - Profit or Loss
• 018. 50491 - Brokers
• 018. 50787 - Expected Value
• 019. 50438 - Pattern with stars
• 020. 50485 - Center of gravity of a ...
• 020. 50408 - Molecules
• 022. 50366 - Student Averages (2 G...
• 023. 50437 - Age Labeling
• 024. 50372 - Number Quadruplets
• 025- 2013-Nov-01. 50328 - How far ...
• 026. 50399 - Mobile Base Station
• 026. 50487 - Radius of Inscribed Circle

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Question by Erisa Terolli.

Pattern with stars

Draw a square in which only the sides and diagonals are marked by stars as shown in the image.

Input specification
There will be one integer (n) which will determine the size of the square where 5 ≤ n ≤ 30.

Output specification
Draw a pattern as in the examples which is followed by an endline char.

 Sample Input I     Sample Input II   
 5  8
*****
** **
* * *
** **
*****
********
**    **
* *  * *
*  **  *
*  **  *
* *  * *
**    **
********

Для отправки решений необходимо выполнить вход.

www.contester.ru