Mosaic matrix: Difference between revisions
Content added Content deleted
(Added Processing implementation) |
|||
Line 693: | Line 693: | ||
1 0 1 0 1 0 1 0 1 0 1</pre> |
1 0 1 0 1 0 1 0 1 0 1</pre> |
||
=={{header|Processing}}== |
|||
<lang java> |
|||
//Aamrun, 27th June 2022 |
|||
size(1000,1000); |
|||
textSize(50); |
|||
for(int i=0;i<10;i++){ |
|||
for(int j=0;j<10;j++){ |
|||
noFill(); |
|||
square(i*100,j*100,100); |
|||
fill(#000000); |
|||
if((i+j)%2==0){ |
|||
text("1",i*100+50,j*100+50); |
|||
} |
|||
else{ |
|||
text("0",i*100+50,j*100+50); |
|||
} |
|||
} |
|||
} |
|||
</lang> |
|||
=={{header|Python}}== |
=={{header|Python}}== |