As ixmike pointed out, c is useless, and most importantly, i is not initialized (and should probably be an integer, int, and not a double).
Now, the input of p and the condition for the loop are not correct. The thing that you have to notice in this problem is that you know the value of Pi = 3.1415926535897932384626433832795 to a very good level of precision anyways. So, the important information to ask at the input is not what p should be, but to what precision you want to approximate Pi. Obviously, from the question, the level of precision required is in the number of significant digits. So, the termination condition should be when the absolute difference between your approximated Pi and the real Pi is less than required precision (±0.5, ±0.05, ±0.005, ±0.0005,...). So, you should ask for how many significant digits are needed, compute the tolerance, and use it as the termination of the loop. Now, if you were to implement this without knowing the actual value of Pi, you could terminate whenever the last change in the approximate value (i.e. the last calculated term of the equation) turns out to be less than the given tolerance.