I do not understand what is being done in the code! It seems flawed - use of uninitialized pointers, invalid pointer assignments, etc - care to explain?
in the first line, 'i' has been declared twice and in the last line, its 'printf' and not 'prnitf'.
other than these errors the program compiles successfully, but doesn't run.
the reason is you used x as 'x[10] instead of x[1]'. i.e u tried to store all the 10 values in consecutive locations of x declaring it as an array of size 1.
declaring x[1] and referencing other indexes like x[2], x[3] etc is the reason for this error.
just type, x[10] in the first line instead of x[1]. it works perfectly. so go for a different logic.
Hi Guest we just wanted to alert you to a major change in the forum. We will no longer be allowing the posting of outgoing links. Please use the attachment feature to attach media to your posts.