Anik_Akash

b no

May 17th, 2020
118
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2. // b no problem;
  3. int main()
  4. {
  5.     int a ,b, c, diff, sum;
  6.  
  7.     scanf("%d %d  %d", &a,  &b,  &c);
  8.     diff =c-(a+b);
  9.     if(diff == 0){
  10.         printf("%d+%d=%d\n",a,b,c);
  11.     }
  12.     else if(diff % 2 !=0){
  13.         printf("Impossible\n");
  14.     }
  15.     else if(diff%2==0){
  16.             if(diff>=4){
  17.         diff=diff/2;
  18.         printf("%d+%d=%d\n", diff, diff,  diff+diff);
  19.             }
  20.             else{
  21.                  printf("%d+%d=%d\n", diff, diff,  diff+diff);
  22.             }
  23.     }
  24.     return 0;
  25. }
RAW Paste Data