In[67]:=
Print[ a,b,c]
abc
;[o]
abc
To get the appropriate space, specify it in the statement.
In[68]:=
Print[ a, " ", b, " ", c]
a b c
;[o]
a b c
Additional characters that are useful are "\t" for the tab and
"\n" for the end of line. Unlike
C, Mathematica always places an end of line character at the end of a
Print statement.
In[69]:=
Do[ Print[ "First prime above ", 10^n, " is ",
firstprimeabove[ 10^n]],
{n, 1, 10}]
First prime above 10 is 11
First prime above 100 is 101
First prime above 1000 is 1009
First prime above 10000 is 10007
First prime above 100000 is 100003
First prime above 1000000 is 1000003
First prime above 10000000 is 10000019
First prime above 100000000 is 100000007
First prime above 1000000000 is 1000000007
First prime above 10000000000 is 10000000019
;[o]
First prime above 10 is 11
First prime above 100 is 101
First prime above 1000 is 1009
First prime above 10000 is 10007
First prime above 100000 is 100003
First prime above 1000000 is 1000003
First prime above 10000000 is 10000019
First prime above 100000000 is 100000007
First prime above 1000000000 is 1000000007
First prime above 10000000000 is 10000000019
Up to Tutorial