#include<stdio.h>
void main( ) {
int i, j, k, lines, l, m;
int arr[ 4 ] = { 1 , 0 , 0 , 1 } ;
for ( i= 1 ; i< lines; i++ ) {
if ( i% 2 == 0 ) {
m= k= 2 ;
l= 4 ;
}
else {
m= k= 0 ;
l= 2 ;
}
for ( j= 0 ; j< i; j++ ) {
k++;
if ( k== l) {
k= m;
}
}
}
}
I2luY2x1ZGU8c3RkaW8uaD4Kdm9pZCBtYWluKCl7CmludCBpLGosayxsaW5lcyxsLG07CmludCBhcnJbNF09ezEsMCwwLDF9OwpwcmludGYoIkVudGVyIGxpbmVzOiAiKTsKc2NhbmYoIiVkIiwmbGluZXMpOwpwcmludGYoIlxuXG4iKTsKZm9yKGk9MTtpPGxpbmVzO2krKyl7CmlmKGklMj09MCl7Cm09az0yOwpsPTQ7Cn0KZWxzZXsKbT1rPTA7Cmw9MjsKfQpmb3Ioaj0wO2o8aTtqKyspewpwcmludGYoIiVkICAiLGFycltrXSk7CmsrKzsKaWYoaz09bCl7Cms9bTsKfQp9CnByaW50ZigiXG4iKTsKfQp9
compilation info
prog.c:2: warning: return type of ‘main’ is not ‘int’
prog.c: In function ‘main’:
prog.c:6: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result
stdout
Enter lines:
1
0 1
1 0 1
0 1 0 1
1 0 1 0 1
0 1 0 1 0 1
1 0 1 0 1 0 1
0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1