Advertisement
Guest User

Untitled

a guest
May 26th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #include <iostream>
  2. #include "circle.h"
  3.  
  4. int main() {
  5. int n = 3;
  6. Circle *arr = new Circle[n];
  7.  
  8. arr[0] = Circle(5, 0, 0);
  9. arr[1] = Circle(3, 0, 0);
  10. arr[2] = Circle(2, 0, 0);
  11.  
  12. CircleArray some(arr, n);
  13. double *len = some.getLenghts();
  14. for (int i = 0; i < n; i++) {
  15. cout << len[i] << " ";
  16. }
  17.  
  18. cout << endl;
  19. for (int i = 0; i < n; i++) {
  20. Circle cur = some[i];
  21. cout << cur.radius << " " << cur.x << " " << cur.y << endl;
  22. }
  23.  
  24. for (circleIterator n = some.begin(); n != some.end(); n++) {
  25. cout << *n << " ";
  26. }
  27. cout << endl;
  28.  
  29. for (circleIterator it(&some); !it.isEnd(); it++) {
  30. it = (it.getCount() + 1) * 10;
  31. }
  32.  
  33. for (circleIterator it(&some); !it.isEnd(); it++) {
  34. cout << *it << " ";
  35. }
  36.  
  37. cout << endl;
  38. for (int i = 0; i < n; i++) {
  39. cout << some[i].radius << " ";
  40. }
  41. cout << endl;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement