In: Computer Science
Given the following pre-condition and program segment, what is the post-condition for y?
// Pre-condition: -2 <= x < 4
y = 2*x*x - x +3
post condition for y will be :
for x = -2 , y = 2*-2*-2 - -2 +3 = 13
for x = 4 , y = 2*4*4 - 4+3 = 15
hence y will be 13<= y < 15