a=20; while a>0 & a<100; b=input('place a bet ') if b>a; error('You cannot bet more than your capital') else n=randn if n>0 a=a-b; display('you lost, your remaining capital is') % t= [' your remaining capital is ' 'num2str(a) '] %display(t) % a else a=a+b; display('you won,your remaining capital is') % a end end a if a<=0 display('you are broke') elseif a>=100 display('you have won it all, cannot win any more!') end end