// 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();
}
#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();
}
>>Check this..
ReplyDeletehttp://m-it-info.blogspot.in/2012/02/computer-graphics-man-in-raincode-in-c.html
>>Man In The Rain....Using C Graphics..!!