bomjorii, void func(x1, x2){ for(int i=x1; i<=x2; i+=h){ cout<<function; } } x1 x2 - границы, h - шаг