(* ############################################################ *) (* Examples of While, Do, and For loops with the Print function *) (* ############################################################ *) Print["=====Loops======"] Print["================"] Print["====Integers===="] n = 1; While[n <= 4, Print[n]; n++] Print["====Squares====="] Do[Print[n^2], {n, 4}] Print["=====Cubes======"] For[i=1,i<=4,i++,Print[i^3]] Print["================"]