Computer Science, asked by engineerkanil2591, 1 year ago

start,y=x,y=x/10+2y,print y,stop

Answers

Answered by ankurbadani84
0

Answer : - y = 0 is the answer for this .

y = x -- (1)

y = x/10 + 2y

y = - x/10

10 y + x = 0 -- (2)

Substituting (1) in (2) , then we get

10 y + y = 0

So, y = 0


prashilpa: this is wrong, this is computer program not equation. Please check once.
Answered by prashilpa
0

start,                          (step 1)

y=x,                            (step 2)

y=x/10+2y,                  (step 3)

print y,                        (step 4)

stop                             (step 5)

In step 2,  y gets the value of x.

In step 3,  Y again gets value of x/10 + 2y  (Here y is already x from above step)

y becomes x/10+2x that is 21x/10 (if x is real)

y become 2x+x/10 (if x is integer)

Example:

if x = 234 then

y = 491.4 (if x is real)

y = 491 (if x is integer)

Similar questions