Untitled
raw download clone
CPP
views 30
,
size 274 b
#include <iostream>
using namespace std;

void divizor(int a, int d)
{
    if(d <= a / 2)
    {
        if(a % d == 0)
            cout << d << ' ';
        divizor(a, d + 1);
    }
}

int main ()
{
    int n, m;
    cin >> n >> m;

    divizor(n, m);
}
close fullscreen
Login or Register to edit or fork this paste. It's free.