Guest User

Untitled

a guest
Apr 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. struct str
  4. {
  5. double a;
  6. char c;
  7. };
  8.  
  9. void wypisz(struct str s)
  10. {
  11. printf("%10.5f %c\n", s.a, s.c);
  12. }
  13.  
  14. struct str Zwieksz(struct str s)
  15. {
  16. struct str Wynik;
  17. wynik.a = s.a + 3.14;
  18. wynik.c = s.c + 1;
  19. return wynik;
  20. }
  21.  
  22. int main()
  23. {
  24. struct str a={5.1615,'x'}, b;
  25. wypisz(a);
  26. b=zwieksz(a);
  27. wypisz(b);
  28.  
  29. return 0;
  30. }
Add Comment
Please, Sign In to add comment