Facebook
From Trivial Marmoset, 2 Months ago, written in C++.
Embed
Download Paste or View Raw
Hits: 45
  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4.  { int m = 5;
  5.  int n = 4;
  6.   int k = 0;
  7. if ((m+n)<k)
  8.  { cout<<"K:"<<k;
  9. } else { k = m + n;
  10.  if ((m+1)<n) { n*=4; k--; }
  11.  else { m*= 2; } }
  12. cout <<"M:"<<m<<"N:"<<n<<"K:"<<k<<endl;
  13.  
  14.  return 0;}
  15.  
  16.  
  17.