Question: Only four lines to see about conditon for and if

 


Dear the specialst in programmation, please I need to put a conditon if in this procedure with this form: Can you correct me this code please. Thank you.


aaa:=proc(x,y,f,N)
local bb,
for i= from 1 to N do

bb[i]:=f(x[i],y);

if bb[i]<=2 then y:=3*x[i] else y::=x[i]^2end if ;

end do:

end proc

 

 

Please Wait...