I have multiple lines in a cell in mathematica created by pressing enter like:
In[12]:= 1 + 2
3 + 4
5 + 6
Out[12]= 3
Out[13]= 7
Out[14]= 11
I want to separate the input into multiple cells so that I can get the output as
In[18]:= 1 + 2
Out[18]= 3
In[19]:= 3 + 4
Out[19]= 7
In[20]:= 5 + 6
Out[20]= 11
Is there a way of doing this other than copying each line and pasting in a different cell and then running it. Actually, I have a file with a thousand of such input line and I want the output right after the inputs.
Scan[foo, {1, 2, 3}]
produces no output so matching will break. $\endgroup$