C program to print box pattern using loops
Input a number and print the following box pattern in C language,
4 4 4 4 4 4 4
4 3 3 3 3 3 4
4 3 2 2 2 3 4
4 3 2 1 2 3 4
4 3 2 2 2 3 4
4 3 3 3 3 3 4
4 4 4 4 4 4 4
Input format:
The input will contain a single integer.
Constraints:
1<=n<=100
Output format:
Print the pattern mentioned in the problem statement.
Example
Input:
2
Output:
2 2 2
2 1 2
2 2 2
Code to print the box pattern in C
Output
need an explanation for this answer? contact us directly to get an explanation for this answer