Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
27
Task/Pinstripe-Display/C/pinstripe-display.c
Normal file
27
Task/Pinstripe-Display/C/pinstripe-display.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
#include<graphics.h>
|
||||
#include<conio.h>
|
||||
|
||||
#define sections 4
|
||||
|
||||
int main()
|
||||
{
|
||||
int d=DETECT,m,maxX,maxY,x,y,increment=1;
|
||||
initgraph(&d,&m,"c:/turboc3/bgi");
|
||||
|
||||
maxX = getmaxx();
|
||||
maxY = getmaxy();
|
||||
|
||||
for(y=0;y<maxY;y+=maxY/sections)
|
||||
{
|
||||
for(x=0;x<maxX;x+=increment)
|
||||
{
|
||||
setfillstyle(SOLID_FILL,(x/increment)%2==0?BLACK:WHITE); //The only line which differs
|
||||
bar(x,y,x+increment,y+maxY/sections);
|
||||
}
|
||||
increment++;
|
||||
}
|
||||
|
||||
getch();
|
||||
closegraph();
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue