Advertisement
Patresss

Untitled

Aug 28th, 2014
437
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. struct rectangle{
  3.     double a;
  4.     double h;
  5. };
  6.  
  7. struct x_rectangle{
  8.     struct rectangle rect;
  9. //  double rect_pole;
  10. };
  11.  
  12.  
  13.  
  14. int main(void)
  15. {
  16.     float a,h,pole;
  17.     struct x_rectangle *prostokat,pom;
  18.     prostokat=&pom;
  19.     puts ("Podaj boki a i h:");
  20.     scanf("%f %f",&prostokat->rect.a,&prostokat->rect.h); //tu coc pewnie namieszalem
  21.  
  22.         printf("Twoje dane: [a = %f]   [h = %f]" , prostokat->rect.a, &prostokat->rect.h);
  23.  
  24. return 0;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement