STANAANDREY

sim 2021 III 1

May 10th, 2021 (edited)
724
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void divX(int n, int x) {
  5.     n *= x;
  6.     while (n) {
  7.         cout << n << ' ';
  8.         n -= x;
  9.     }
  10. }
  11.  
  12. int main() {
  13.     int n, x;
  14.     cin >> n >> x;
  15.     divX(n, x);
  16.     return 0;
  17. }
  18.  
  19.  
  20.  
Add Comment
Please, Sign In to add comment