Advertisement
PaweU

fadfsa

Dec 11th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. struct okrag {
  4. double x;
  5. double y;
  6. double r;
  7. };
  8.  
  9. struct linia {
  10. double xp;
  11. double yp;
  12. double xk;
  13. double yk;
  14. };
  15.  
  16. union typ {
  17. struct okrag o;
  18. struct linia l;
  19. };
  20.  
  21. enum te { okrag, linia};
  22.  
  23. struct figura {
  24. char kolor;
  25. float grubosc;
  26. union typ_fig fig;
  27. enum te selektor;
  28. };
  29.  
  30. int main (void);
  31.  
  32. struct figura f;
  33. f.kolor='c';
  34. f.grubosc=2;
  35.  
  36. f.selektor = kolko;
  37. f.fig.o.x=7.0;
  38. f.fig.o.y=8.0;
  39. f.fig.o.r=9.0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement