Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <math.h>
- #include "winbgi2.h"
- void drawscene();
- int main(void)
- {
- int r=5;
- double g=9.81;
- double angle=60;
- int x=40, y=350;
- int Vx=5;
- int Vy=20;
- graphics(400,400);
- drawscene();
- while(animate(12))
- {
- clear();
- drawscene();
- circle(x,y,r);
- x+=Vx;
- Vy-=1;
- y-=Vy;
- if(y>=365)break;
- }
- while(animate(10))
- {
- clear();
- drawscene();
- r+=1;
- circle(x,y,r);
- if(r==22)break;
- }
- clear();
- drawscene();
- wait();
- printf("To koniec przedstawienia\n");
- }
- void drawscene()
- {
- line(0,380,400,380);//ground
- //TANK
- line(20,380,20,360);
- line(20,360,60,360);
- line(60,360,60,380);
- line(30,350,50,350);
- line(30,360,30,350);
- line(50,360,50,350);
- //End TANK
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement