+ 1
create an array the size of a users input
i need to create an array the length of a users input in c# with the array starting at 1 and ending with the users input number ex: user input 5, array = {1,2,3,4,5}.
4 Answers
+ 7
you could create a new array
int arr[] = new int[input];
Then loop through the array length adding the value of the loop cycle to each element
for(int i = 0; i < arr.length;i++){
arr[i]+=i;}
+ 3
no probs david đ
+ 2
awesome think you so much