Lecture2013 02 12
Lecture2013 02 12
before the #$ % &ou can write for x=0:2:8; y=x; for ' stars (hile is nested in the for loop
)* "tart a* Di+isor $ 2 2* ,epeat a* ,epeat (n!di+isor) b* Di+isor $ di+isor - ) .* /nd a* ,em(n!di+isor)$ b* Di+isor $ n0
)* Di+isor 2% 2* (hile 11rem(n , divisor ~=0)_ Divisor = divisor + 1; .* /nd 2f di+isor $$n Disp(3prime4) /lse disp(3composite4) /nd
6or r $ lo:hi 7at row r! get products with column headings 6or c $ lo:hi 6printf(378d4!r9c) 7if &ou do fprintf(3n:4) here then &ou will ha+e a line after each product /nd 6printf(3:n4) 7print after e+er& row /nd