Advertisement
Guest User

Untitled

a guest
Nov 13th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <iostream>
  2. #include <unistd.h>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8. int N=100,y0=6,x0=6,r=7,d=r+r;
  9. /*for (int t=0; t<4;t++){*/
  10. for (int y=0; y<N;y++){
  11. for (int x=0; x<N; x++){
  12. int x1=x%d;
  13. int y1=y%d;
  14. int d2=(x1-x0)*(x1-x0)+(y1-y0)*(y1-y0);
  15. if (d2>=r*r-7 && d2<=r*r+7){
  16. cout <<"* ";
  17. }
  18. else{
  19. cout<<" ";
  20. }
  21. }
  22. cout<<endl;
  23.  
  24. }
  25.  
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement