Advertisement
Mary_99

ex1.4

Nov 21st, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1.  
  2. #include <stdio.h>
  3.  
  4. int main()
  5. {
  6.     int a;
  7.     int b;
  8.     float left;
  9.     float right;
  10.     printf("a =");
  11.     scanf("%d", &a);
  12.     printf("b =");
  13.     scanf("%d", &b);
  14.     left = ((a + b)*(a - b));
  15.     right = (pow(a,2)-pow(b,2));
  16.  
  17.        if (right == left)
  18.         {
  19.             printf("true");
  20.         }
  21.         else
  22.         {
  23.                 printf("false");
  24.         }
  25.  
  26.   return 0;
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement