Advertisement
Tahamina_Taha

S_chapter 5 prblm 1

Aug 7th, 2019
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.30 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. //math problem
  4. {
  5.     double x,y,xpy,xmy;
  6.     printf("enter the value of x+y:");
  7.     scanf("%lf",&xpy);
  8.     printf("enter the value of x-y:");
  9.     scanf("%lf",&xmy);
  10.     x=(xpy+xmy)/2;
  11.     y=(xpy-xmy)/2;
  12.     printf(" x= %0.2lf ,y=%0.2lf",x,y);
  13.     return 0;
  14.  
  15.  
  16.  
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement