how to print hallow patten with numbers | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to print hallow patten with numbers

1 1 2 1 3 1 4 1 2 3 4 5

29th Sep 2022, 2:05 PM
Naga Dina S.P
Naga Dina S.P - avatar
1 Answer
+ 1
Hint: as you see in the example - you prepare two loops - outer loop create lines 4 times - it starts with a inner loop from 1 till 2 - inner loop will each time of outer loop be grater - first and last line will be shown full mit digits - in the other lines only first and last items are digits and rest are spces. Try to code that step by step. If you need furter help link here your attempt with a question.
29th Sep 2022, 2:39 PM
JaScript
JaScript - avatar