answersLogoWhite

0

#include


#include


#include


#include


#include


void main()


{


int dr,md,midx,i, midy,dx,dy,mx, my,k,x,y,xdir,ydir,oldx,oldy;


double pi,tpi,a,t;


void *ball;



unsigned imgsize;


dr = DETECT;



initgraph(&dr, &md, "c:\\tc\\bgi");


midx = getmaxx()/2; midy = getmaxy()/2;


pi = 3.14159;


tpi = pi * 2.0;


setcolor(13);


circle(midx,midy,10);


imgsize = imagesize(midx-10, midy-10, midx+10, midy+10);


ball = malloc(imgsize);


getimage(midx-10, midy-10, midx+10, midy+10,ball);


putimage(midx-10, midy-10, ball,XOR_PUT);




xdir = -5; ydir=5;



do


{


oldx = midx; oldy = midy;


midx = midx + random(xdir);


midy = midy + random(ydir) ;



if (midx < 0)


{


midx = midx + 5;


xdir =5;


}


if (midx > getmaxx())


{


midx = midx - 5;


xdir = -5;


}


if (midy < 0)


{


midy = midy + 5;


ydir = 5;


}


if (midy > getmaxy())


{


midy = midy - 5;


ydir = -5;


}



putimage(midx-10, midy-10,ball,XOR_PUT);


for (a=1.0; a<30000.0; a=a+0.1);


{


}


putimage(midx-10, midy-10,ball,XOR_PUT);




} while (!kbhit());



getch();


}


User Avatar

Wiki User

13y ago

What else can I help you with?

Related Questions

What is the code number for code c on forever lost?

In the office room with the computer without keyboard. If you wait just a bit, the screensaver will come on. And the screensaver is your answer "C : 8008"


Where can I get th code for Koi Fish 3D Screensaver 1.0?

You can typically find the code for Koi Fish 3D Screensaver 1.0 on the official website of the software developer or through authorized software distribution platforms. If you're looking for source code or a specific version, consider checking repositories like GitHub or forums dedicated to software development. Always ensure that you are downloading from trusted sources to avoid malware or unauthorized versions.


Source code to design a screensaver in VB?

To create a simple screensaver in Visual Basic, you can use the following code snippet as a starting point. This example displays a moving form that changes color: Public Class Screensaver Private Sub Screensaver_Load(sender As Object, e As EventArgs) Handles MyBase.Load Me.FormBorderStyle = FormBorderStyle.None Me.WindowState = FormWindowState.Maximized Timer1.Start() End Sub Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles Timer1.Tick Me.BackColor = Color.FromArgb(Random.Next(256), Random.Next(256), Random.Next(256)) Me.Location = New Point(Random.Next(Screen.PrimaryScreen.Bounds.Width - Me.Width), Random.Next(Screen.PrimaryScreen.Bounds.Height - Me.Height)) End Sub End Class Make sure to add a Timer control to your form and set its interval (e.g., 1000 ms) for the desired effect. Adjust the logic as needed to suit your screensaver design.


How do you convert C source code into a screensaver for Linux?

Most screensavers on Linux are modules run by Xscreensaver: http://en.wikipedia.org/wiki/XScreenSaver I don't know exactly how to convert a program to a module, check the Xscreensaver documentation.


Is having a unsecured load a moving violation in Texas?

No. Source: Texas Administrative Code, 37 TAC &sect;15.89(b).


What is the pin code of Jacob Circle?

The pin code of Jacob Circle is 400011.


What is the airport code for Circle City Airport?

The airport code for Circle City Airport is IRC.


What is the python code for drawing a circle?

circle(radius)


Is Source Code the same as CSS Code?

It can be but source code is just the code of a webpage. Whatever format it is.


What is the airport code for Circle Hot Springs Airport?

The airport code for Circle Hot Springs Airport is CHP.


Where does source code come from in java?

Source code comes from the programmer...


What is theCheat code in gta3 to get airplane?

circle, triangle, L1, R1,R2,R1,circle, circle