C
c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// Created by Swapnil More
/*
This code takes an input as a number and prints a pattern which consists pallindrome numbers.
Example
Input:
5
Output:
1
121
12321
1234321
123454321
*/
// Challenge thread is in the comments section
int main() {int i,j,a,c=1;printf("Enter the number of rows: ");scanf("%d", &a);printf("%d\n",a);if(a<=0 || a>60)printf("Enter a number in the range of 1 to 60");else{for(i=1;i<=2*a;i+=2){for(j=1;j<=i;j++){printf("%d",c);
if(j<=i/2) c++;else c--;}c=1;printf("\n");}}}
// Created by Swapnil More
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run