Friday, October 9, 2015

patterns

10
101
1010 
10101
 #include<stdio.h>
 #include<conio.h>
int main() 
{
 int a,b; 
 for(a=1;a<=5;a++) 
 { 
 for(b=1;b<=a;b++)
 { 
 printf("%d",b%2); 
 } 
 printf("\n"); 
 } 

}


No comments:

Post a Comment