Advertisement
Guest User

Untitled

a guest
May 21st, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <math.h>
  3. #include "winbgi2.h"
  4. void drawscene();
  5. int main(void)
  6. {
  7.     int r=5;
  8.     double g=9.81;
  9.     double angle=60;
  10.     int x=40, y=350;
  11.     int Vx=5;
  12.     int Vy=20;
  13.  
  14.     graphics(400,400);
  15.    
  16.     drawscene();
  17.  
  18.     while(animate(12))
  19.     {
  20.         clear();
  21.         drawscene();
  22.         circle(x,y,r);
  23.         x+=Vx;
  24.         Vy-=1;
  25.         y-=Vy;
  26.         if(y>=365)break;
  27.     }
  28.  
  29.     while(animate(10))
  30.     {
  31.     clear();
  32.     drawscene();
  33.     r+=1;
  34.     circle(x,y,r);
  35.     if(r==22)break;
  36.     }
  37.  
  38.     clear();
  39.     drawscene();
  40.     wait();
  41.     printf("To koniec przedstawienia\n");
  42. }
  43.  
  44. void drawscene()
  45. {
  46.    line(0,380,400,380);//ground
  47.     //TANK
  48.     line(20,380,20,360);
  49.     line(20,360,60,360);
  50.     line(60,360,60,380);
  51.  
  52.     line(30,350,50,350);
  53.     line(30,360,30,350);
  54.     line(50,360,50,350);
  55.     //End TANK
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement