how to write a rainy effect screensaver program in c language in 16bit and 32bit


Hi friends, Now We can  Form a Rainy day screensaver effect in c language. It is possible. Yes. it is possible. Open the notepad and paste the following source code in notepad and save the file "C:" drive with the name of "RAINY.C". Now Open The Turboc2(C Language) and press F3 and type "C:\RAINY.C". Then Press F2 and Save RAINY.C and Compile the program of press F9 and Press Esc to close the compiler and Now The Execute The Program To Play the Rainy Screensaver effect so Press Ctrl+F9. And Enjoy The Rainy effect.

Source Code:
 
#include<graphics.h>
#include<stdlib.h>
void main(void)
{
int GD=DETECT,GM;
int Maxx,Maxy,i;
initgraph(&GD,&GM,"");
Maxx=getmaxx();
Maxy=getmaxy();
while(!kbhit())
{
setcolor(WHITE);
for(i=0;i<600;i++)
outtextxy(random(Maxx),random(Maxy-50),"/");
cleardevice();
setcolor(RED);
outtextxy(300,450,"www.Techinsite.Blogspot.com");
}
getch();
closegraph();

}

This Program is 100 Percent Works and enjoy.

0 comments:

Post a Comment