Write a program that allows the user to enter the slope and intercept, along with a value for n to compute the values of z for the general solution to this two variable problem. X and y vary between 1 and n.
That's not really a question that is you stating you don't know what to do. What code have you provided so far? It seems pretty straight forward ask the user to enter the slope, intercept, and n(std::cout, std::cin). It seems that x and y also need to be between 1 and n.
"slope" and "intercept" are used usually as the names of constants in a mathematical equation: y = slope*x+intercept. That is a f(x)=y, not f(x,y)=z.
Overall, f(x)=y is not a problem. It is an equation. The analytic solution. Furthermore, printing the value of f(x) for all values of x is not a "general solution"; there are infinite number of values of x, even between 0 and 1.