C Number Pattern 50

Last Updated:

C Number Pattern 50

Try to print the following number pattern using C.

Print This Output
12345
21234
32123
43212
54321

Source Code

C Compiler
#include <stdio.h> int main() { int i, j, k; for(i=1; i<=5; i++) { for(j=i; j>1; j--) printf("%d", j); for(k=1; k<=6-i; k++) printf("%d", k); printf("\n"); } return 0; }

Share this Page

Meet the Author