Answer the question
In order to leave comments, you need to log in
Is it possible to work with an array in a function in Kotlin?
If it is possible, please tell me how it can be done? For example, in C++ it works like this:
void input(int x [], int size )
{
for ( int i = 0; i < size; i++)
x[i] = rand()%31-15;
return;
}
Answer the question
In order to leave comments, you need to log in
Yes, you can.
Only the syntax will be different.
https://kotlinlang.ru/docs/reference/basic-types.html
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question