Why is x a char data type ?
If you want to calculate this concretely, you need three variables for the calculation.
The question here would be if all three are read in, or where else do they come from ?
If you don't read in X, you could only output the formula without a concrete result. If you have all three values you can calculate the result. The output of the power seems to be calculated and output step by step. For this you need a loop that runs from 1 ... n.
The result for a power would be calculated stepwise like this:
result = (X - a) * (X - a) * (X - a) ...
Since with (x - a) always the same comes out one needs to calculate it only once with u = x - a. This results in
result = (u) * (u) * (u) ...
At each step, the result of a bracket is calculated and multiplied by the previous result.
int a, x, n;
puts("Solver for (x - a) ^ n");
printf("Enter value of a: ");
scanf("%d", &a);
...
int u = x - a;
int result = 1;
for (int i=1; i <= n; i++) {
...