fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. struct Punct {
  5. int x, y;
  6. };
  7.  
  8. struct Dreptunghi {
  9. Punct stangaJos, dreaptaSus;
  10. };
  11.  
  12. void actualizareDreptunghi(Dreptunghi& dreptunghi, int x1, int y1, int x2, int y2) {
  13. dreptunghi.stangaJos.x = x1, dreptunghi.stangaJos.y = y1, dreptunghi.dreaptaSus.x = x2, dreptunghi.dreaptaSus.y = y2;
  14. cout << dreptunghi.stangaJos.x << dreptunghi.stangaJos.y << dreptunghi.dreaptaSus.x << dreptunghi.dreaptaSus.y;
  15.  
  16. }
  17.  
  18. int main() {
  19. Dreptunghi dreptunghi;
  20. int a, b, c, d;
  21. cin >> a >> b >> c >> d;
  22. cout << "Am citit coordonatele " << a << " " << b << " " << c << " " << d << "\n";
  23. actualizareDreptunghi(dreptunghi, a, b, c, d);
  24. return 0;
  25. }
  26.  
Success #stdin #stdout 0s 5552KB
stdin
2 5 4 2
stdout
Am citit coordonatele 2 5 4 2
2542