New Want to Write for Computaholics ? if Yes Contact us at "contact@computaholics.in"

c program to print given number pattern

Write a c program to print given number pattern
000000
011110
011110
011110
011110
000000

#include<stdio.h>

int main()
{
    int j,k;
    for(j=1;j<=6;j++)
    {
        for(k=1;k<=6;k++)
        {
            if(k==6 || k==1 || j==1 || j==6)
                printf("0");
            else
                printf("1");
        }
        printf("\n");
    }
}
Copyright © C Program | Java | OpenGL Programming | Hadoop at Computaholics