Advertisement
Guest User

CSC

a guest
Jun 18th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. //Program Repeating Square
  2. //Programmer : Kenenth Parson
  3.  
  4. size(500,500);
  5. for(int x=0, y=250; y>=0; x=x+5, y=y-5)
  6. {
  7. fill(x);
  8. rect(x,y,25,25);
  9. }
  10. for( int x=250, y=0; x<=500; x=x+5, y=y+5)
  11. {
  12. fill(255-y);
  13. rect(x,y,25,25);
  14. }
  15. for(int x=500, y=250; y<=500; x=x-5, y=y+5)
  16. {
  17. fill(255-x);
  18. rect(x,y,25,25);
  19. }
  20. for(int x=250, y=500; y>=250; x=x-5, y=y-5)
  21. {
  22. fill(255-y);
  23. rect(x,y,25,25);
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement