Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I am writing a module. When I run the module, I want it to ask for a variable, like I can in other programing languages such as C++ or Python.

For example, in C++:

int i;
cout << "Please enter an integer value: ";
cin >> i;

I want something similar to the above in Mathematica.

share|improve this question

marked as duplicate by m_goldberg, Oleksandr R., Jens, Yves Klett, bobthechemist May 22 '14 at 20:51

This question was marked as an exact duplicate of an existing question.

2  
How about Input? – Öskå May 22 '14 at 12:24
    
That is good. How can I use Input iteratively? In order to input several variables at once. – MOON May 22 '14 at 12:28
    
You can insert a List inside the Input[] field and it will returns this list: vars = Input[]; Head@vars will be a List if you provide {something, something else}. – Öskå May 22 '14 at 12:30
1  
Suggest you read this tutorial. – m_goldberg May 22 '14 at 12:34
    
This question is relevant, too. – m_goldberg May 22 '14 at 14:18