answersLogoWhite

0

#include<stdio.h>

#include<conio.h>

void main()

{

int i,j,k=0,l;

clrscr();

for(i=1;i<=5;i++)

{

for(j=1;j<=i;j++)

{

k++;

printf("%d ",k%2);

}

for(l=i;l<=4;l++)

{

k++;

}

printf("\n");

}

getch();

}

User Avatar

Wiki User

14y ago

What else can I help you with?