如何运用Mathematica软件计算

1个回答

  • 我输入我再Mathematica运行的结果.其中,“In[]:=”是Mathematica自动显示的.你输入时不要输入,只输入下面一行的东西就是了.

    问题1

    In[1]:=

    a=3;b=4;c=5;

    (a+b)(b+c)

    Out[2]=

    63

    问题2

    In[3]:=

    N[E,25]

    Out[3]=

    2.718281828459045235360287

    问题3

    In[4]:=

    12*6

    Out[4]=

    72

    In[5]:=

    15*7

    Out[5]=

    105

    In[6]:=

    %+%%

    Out[6]=

    177

    问题4:

    In[7]:=

    Factorial

    运行后会显示,

    "n!gives the factorial of n.More..."

    In[8]:=

    Factorial

    运行后会显示,

    "n!gives the factorial of n.More..."

    Attributes[Factorial]={Listable,NumericFunction,Protected}

    In[9]:=

    Factorial[100]

    Out[9]=

    933262154439441526816992388562667004907159682643816214685929638952175999932299

    156089414639761565182862536979208272237582511852109168640000000000000000000000

    00

    问题5

    In[10]:=

    Table[Random[Integer,{1,6}],{i,1,4}]

    Out[10]=

    {4,4,3,2}

    每次运行结果会各不相同.

    也可以写个小循环,

    In[13]:=

    For[i=1,i