Write a code in python to print this pattern:
54321
5432
543
54
5
Answers
Answered by
0
Answer:
Logic for 54321 5432 543 54 5 pattern.
User input - N:
for(i=1; i<=N; i++)
{
for(j=N; j>=i; j--)
{
print j value;
}
print new line;
}
This logic will prints the pattern of
5 4 3 2 1
5 4 3 2
5 4 3
5 4
5
Check with online compiler here.
Share
Labels: Codeography
Location: Coimbatore, Tamil Nadu, India
Similar questions