fork(2) download
  1. /*
  2. Problem Source: http://a...content-available-to-author-only...l.org/problems/556a283cf661160300813812
  3. Problem Name : Welcome to CSE, DU
  4.  
  5. Name : Adyel Ullahil Mamun
  6. Year : 2016
  7. Email : adyel@live.com
  8. */
  9. #include <iostream>
  10.  
  11. using std::cout;
  12. using std::cin;
  13.  
  14. int main()
  15. {
  16. int a, b, c;
  17.  
  18. cin >> a >> b >> c;
  19.  
  20. if(c<=a && c<=b)
  21. {
  22. a-=c;
  23. b-=c;
  24. cout << a + b + c << std::endl;
  25. }
  26.  
  27. return 0;
  28. }
  29.  
Success #stdin #stdout 0s 3472KB
stdin
20 10 3
stdout
27