Find us on Google+ Kill the code: Sky effect in C

Saturday, 18 February 2012

Sky effect in C

// WAP to implement sky effect in C...


#include<stdio.h>
#include<conio.h>
#include<graphics.h>
#include<stdlib.h>
#include<dos.h>
void main()
{
int d=DETECT,m,i;
clrscr();
initgraph(&d,&m,"c:\\tc\\bgi");
for(i=0;i<150;i++)
{
putpixel(rand()%1000,rand()%1000,rand()%1000);
putpixel(rand()%1000,rand()%1000,rand()%1000);
putpixel(rand()%1000,rand()%1000,rand()%1000);
putpixel(rand()%1000,rand()%1000,rand()%1000);
putpixel(rand()%1000,rand()%1000,rand()%1000);
putpixel(rand()%1000,rand()%1000,rand()%1000);
putpixel(rand()%1000,rand()%1000,rand()%1000);
putpixel(rand()%1000,rand()%1000,rand()%1000);
delay(50);
}
getch();
closegraph();
}

1 comment:

  1. >>Check this..
    http://m-it-info.blogspot.in/2012/02/computer-graphics-man-in-raincode-in-c.html

    >>Man In The Rain....Using C Graphics..!!

    ReplyDelete