C program to draw a pattern

You need to take an integer input and then draw the pattern according to it.
Say for example if you enter 5 then, the pattern should be like this-
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5
1 2 3 4 5

Input Format
You will take an integer input n from stdin.

Constraints
1 < = n < = 1000 Output Format
Your output should be the pattern according to the input which you had entered.

Sample TestCase 1
Input
5
Output

 

 

Write a C program to print following pattern

Program:

Output:

Help others by sharing the content!

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.