0

Hello every one!

i want to create something like this (show at the bottom of this message as an attachment) but i've no clue how to create this digital payrmid.

can anyone please help me with the code please?

thanks for your help in advance

cheers
sh4rif

1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1
1 2 3 4 5 4 3 2 1
1 2 3 4 5 6 5 4 3 2 1
1 2 3 4 5 6 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 9 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 8 7 6 5 4 3 2 1
1 2 3 4 5 6 7 6 5 4 3 2 1
1 2 3 4 5 6 5 4 3 2 1
1 2 3 4 5 4 3 2 1
1 2 3 4 3 2 1
1 2 3 2 1
1 2 1
1

5
Contributors
4
Replies
7
Views
7 Years
Discussion Span
Last Post by Sgouros
0

Watch out!

The obvious patterns here are looking to bite you! ;)

You need to put some effort into this. We don't serve as homework bwitch's. We help people who are willing to show some real effort.

0

Hope that helps you!

# include <stdio.h>

int main()
{
    int i,j;
    
    for (i=1; i<10; i++) {
	for (j=1; j<i; j++) 
	    printf("%d",j);
	
	for (j=i; j>=1; j--)
	    printf("%d",j);
	
	printf("\n");
    }
    
    for (i=9; i>=1; i--) {
	for (j=1; j<i; j++) 
	    printf("%d",j);
	
	for (j=i; j>=1; j--)
	    printf("%d",j);

	printf("\n");
    }
    return 0;
}
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.