Advertisement
Guest User

Untitled

a guest
Feb 25th, 2020
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <allegro.h>
  4.  
  5. int main()
  6. {
  7. allegro_init();
  8. set_color_depth(32);
  9. set_gfx_mode(GFX_AUTODETECT_WINDOWED,800,600,0,0);
  10. set_window_title("Nazov okna");
  11. install_keyboard();
  12.  
  13. int farba=makecol(255,255,255);
  14. int black=makecol(0,0,0);
  15. circlefill(screen,100,100,15,farba);
  16. line(screen,80,115,180,215,farba);
  17. line(screen,180,215,280,115,farba);
  18. int x=100;
  19. int y=100;
  20.  
  21. do
  22. {
  23. circlefill(screen,x,y,15,farba);
  24. rest(10);
  25. circlefill(screen,x,y,15,black);
  26. x++;
  27. y++;
  28. }
  29. while(x<=200,y<=180);
  30. circlefill(screen,182,180,15,farba);
  31.  
  32. do
  33. {
  34. circlefill(screen,x,y,15,farba);
  35. rest(10);
  36. circlefill(screen,x,y,15,black);
  37. x++;
  38. y--;
  39. }
  40. while(x<=280,y>=90);
  41. circlefill(screen,275,90,15,farba);
  42.  
  43. readkey();
  44. return 0;
  45. }
  46. END_OF_MAIN()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement