弹簧单摆的模拟演示
#include<>
#include<>
#include<>
#include<>
#include<>
#define A 480
#define B 120
main()
{
char q;
int gdriver=VGA,gmode=VGAHI;
int i,cl=0,w=1;
float x,y,v1,v2,a1,a2,L,M,m,k,X,X0,F,F1,F2,g,c,s,G,G1,G2;
float sp=2;
initgraph(&gdriver,&gmode,"");
BG: cleardevice();
setcolor(5);
setbkcolor(0);
settextstyle(3,0,4);
outtextxy(80,50,"Single Pendulum Parameters Input");
setcolor(1);
rectangle(70,50,600,90);
setcolor(2);
rectangle(65,45,605,95);
setcolor(14);
rectangle(60,40,610,100);
setcolor(5);
moveto(100,100);
gotoxy(49,12);printf("");
settextstyle(1,0,2);
outtextxy(80,130,"PLEASE INPUT : ( 0<L<120 )");
setcolor(15);
line(50,160,620,160);
setcolor(5);
outtextxy(80,170,"The Length Of Pendulum L : ");
scanf("%f",&L);
gotoxy(35,15);printf("");
settextstyle(1,0,2);
outtextxy(80,205,"Elastic Coefficient k : ");
gotoxy(40,14);printf("");
scanf("%f",&k);
outtextxy(80,250,"The Quality Of Spherule M :");
gotoxy(50,17);printf("");
scanf("%f",&M);
outtextxy(80,297,"The Quality Of Pedulum Line m : ");
gotoxy(58,20);printf("");
scanf("%f",&m);
setcolor(15);
line(50,380,620,380);
setcolor(5);
outtextxy(60,400,"Press E to Quit AND Press Any Other Key to Go on");
q=getch();
if(q=='e'||q=='E') goto END;
cleardevice();
GN: setcolor(2);
setbkc
弹簧单摆的模拟演示 来自淘豆网m.daumloan.com转载请标明出处.