Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- struct sum
- {
- double x;
- double y;
- };
- int main()
- {
- int i;
- double d,sum1=0,sum2=0;
- struct sum p[2];
- scanf("%lf ",&p[0].x);
- scanf("%lf ",&p[0].y);
- scanf("%lf ",&p[1].x);
- scanf("%lf ",&p[1].y);
- sum1 =p[0].x+p[1].x;
- printf("%lf ",sum1);
- sum2=p[0].y+p[1].y;
- printf("%lf ",sum2);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement