Learn English – How should I translate “take as input”

idioms

"take as input.."

I have no idea what that means..

for example, I extracted a sentence from Google by searching, such as

"Describe an algorithm that takes as input a list of n integers".

What is the meaning of the sentence?

Best Answer

In writing that sentence, I assume that you are a programmer. To 'take as input' means to accept it into your algorithm.

In C, you might express this notion as

int algorithm(int arrayAsInput[])

{

. . .

return output;

}

Related Topic