Concentric Rectangle Patterns
CodeChefOpen on judge ↗
Given a odd number N, your task is to print concentric squares of #'s whose side length is first odd, odd numbers less than N i.e., the 1st,3rd.5th....till 2*N-1 That is if N = 5 , 2*5-1=9 so, print 3 concentric squares with side length 1 , 5, 9 . Similarly, if N=3 then 2*3-1=5 so you print 2 concentric squares of #'s if the input is EVEN print "Coco is in other dream" without quotes Input -
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start