clear a1=1; a2=1; m=0; t=2; while m<=10000 m=a1+a2; a1=a2; a2=m; t=t+1; end m t