csansoon

P2.03 P59875 Top to bottom

Sep 21st, 2018
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.21 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.  
  5. int main() {
  6.     int x,y,a,b,n;
  7.     cin >> x >> y;
  8.    
  9.     if (x>=y) {a=x;b=y;}
  10.     else {a=y;b=x;}
  11.     // a>b
  12.    
  13.     n=a;   
  14.     while (n>=b) {
  15.         cout << n << endl;
  16.         n=(n-1);
  17.     }
  18. }
Add Comment
Please, Sign In to add comment