<div>Hello,</div>
<div> </div>
<div>I have a single dimension array of say &#39;n&#39; elements. I need to subtract each and every value(from this array) from a scalar value say &#39;x&#39;.</div>
<div> </div>
<div>for example, I have array with values, {2,3,5,2,7,8,3}, and let x=4, then the final ouput should me x - arr(i)</div>
<div> </div>
<div>i.e. final output shud be, {2,1,-1,2,-3,-4,1}</div>
<div> </div>
<div>Then after getting this resultant array, I have to replace all the negative values with 0.</div>
<div> </div>
<div>Can anyone help me to accomplish this without iterating through the array...?</div>
<div> </div>
<div>Thanks</div>
<div> </div>
<div>Regards</div>
<div>Rakesh Patil</div>