_takumi

num22

Oct 8th, 2020 (edited)
908
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6.  int x, L, M;
  7.  L = 0;
  8.  for (x = 4, L = 5; L > 0; L -= 1, x += 9) {}
  9.  int x1 = x;
  10.  for (x = 5, L = 4; L > 0; L -= 1, x += 9) {}
  11.  int x2 = x;
  12.  M = max(x1, x2);
  13.  if (M < L) {
  14.     M = L;
  15.     L = x;
  16.  }
  17.  cout << L << endl << M << endl;
  18.  return 0;
  19. }
Add Comment
Please, Sign In to add comment