Number pattern binary

#include<stdio.h>

int main()
{
 int i,j,n=5;
 
 for(i=1;i<=n;i++)
 {
  for(j=1;j<=i;j++)	
  {
  	printf("%d ", j%2);
  }
  printf("\n");
 }
 return 0;
}

Related Post

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.