[ create a new paste ] login | about

Link: http://codepad.org/JlJeTrqI    [ raw code | output | fork ]

C, pasted on Oct 18:
#include <stdio.h>

void main()
{
    int a[10][10] = {0,};
    int i,j;

    for(i=0; i<10; i++)
    {
        for(j=0; j<10; j++)
        {
            if(i<=j)
            {
                a[i][j]=1;
            }
            printf("%d",a[i][j]);
        }
        printf("\r\n");
    }



}


Output:
1
2
3
4
5
6
7
8
9
10
1111111111
0111111111
0011111111
0001111111
0000111111
0000011111
0000001111
0000000111
0000000011
0000000001


Create a new paste based on this one


Comments: