Advertisement
Guest User

Untitled

a guest
Mar 19th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. #include<stdio.h>
  2. struct sum
  3. {
  4.     double x;
  5.       double y;
  6.  
  7. };
  8. int main()
  9. {
  10.     int i;
  11.     double d,sum1=0,sum2=0;
  12.     struct  sum p[2];
  13.     scanf("%lf ",&p[0].x);
  14.     scanf("%lf ",&p[0].y);
  15.     scanf("%lf ",&p[1].x);
  16.     scanf("%lf ",&p[1].y);
  17.     sum1 =p[0].x+p[1].x;
  18.     printf("%lf ",sum1);
  19.     sum2=p[0].y+p[1].y;
  20.      printf("%lf ",sum2);
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement