Lesson 10 of 23

Nested Loops: Patterns

10 min 30 XP

வெளி loop rows, உள் loop ஒவ்வொரு row-ன் எழுத்துகள். Campus tests-ல் pyramid, diamond போன்ற patterns அடிக்கடி கேட்பார்கள்.

Example: edit me and press Run

Output Loading C (first time takes a few seconds)
Press Run to see the result here.

Pyramid-ல் row r-க்கு (n - r) spaces மற்றும் (2r - 1) stars. முதலில் அட்டவணை போடுங்கள், பிறகு code.

Challenge

+30 XP

n-ஐப் படித்து இந்த தலைகீழ் triangle-ஐ print செய்யுங்கள் (n = 4): **** *** ** *

Output Loading C (first time takes a few seconds)
Press Run to see the result here.