How to take input in one line and put it in array

I know for loop can be used, but how to take a single input and fill the indexes of array

Hi @Hardik-Bhardwaj-392610454600906
For taking user input values in array we need to use for loop while in case of pre defined values you can easily put them into array in single line.