Hi frenz,
the above code runs perfect. But while printing the arrays x y z
the value of y[0]changes...could u plz help me in sorting this problem..
thank u..
this is the output..
x y z
1 -1 0
2 4 -2
3 3 0
4 2 2
5 1 4
Hi frenz,
the above code runs perfect. But while printing the arrays x y z
the value of y[0]changes...could u plz help me in sorting this problem..
thank u..
this is the output..
x y z
1 -1 0
2 4 -2
3 3 0
4 2 2
5 1 4
There is a mistake on line 8.
while(i++<5) // the first value you are dealing with is 1 not 0
result[i]=x[i]-y[i];
There is a mistake on line 8.
while(i++<5) // the first value you are dealing with is 1 not 0 result[i]=x[i]-y[i];
yeah..i know tat the array is processed from 1th element not 0th element...y does the value of y[0] changes ...
Repost your code. It got lost when correcting the post -- it's not a Code Snippet.
What was the value of y[0] before? What does it change to?
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.