C Programming Tutorial

 
 
 
 
#include <stdio.h>
#include <stdlib.h>
#include <graphics.h>
#include <conio.h>

void main(){
int gdriver=DETECT,gmode;
int left=200,top=200,right=700,bottom=700,color=15,pat=8;
initgraph(&gdriver,&gmode,\"\");
cleardevice();
while(!kbhit()){
    setfillstyle(random(pat),random(color));
    bar(random(left),random(top),random(right),random(bottom));
    delay(250);
}
closegraph();
}

 
 
Didn't find what you were looking for? Find more on Program to display screen sever using graphics