Welcome to the forums. Please state your question clearly and specifically, just copying your code to us does not tell us much. Are you getting compilation errors? Does the program compile but are you getting runtime errors? If so, which errors are you getting?
Also, please wrap your code within [code][/code]-tags in order to make it more readable.
well just a quick look at it and I notice on the line for (int i = 1; i < abs(n); there should be a ")" after abs(n) to make it look like (int i = 1; i < abs(n));as to close your first parenthesis
Rephrased: I have this piece of code. I have these input. I cannot think through what the code will do with the input. I cannot compile and run the program to see what the code does spit out as output.
Proceed in small steps. Take the first input (3,6). How many times the body of the loop will execute, i.e. which values the i will have?