+ 5

Program to display elements of an Array entered by User

The array created in this program has an array size of five (5). Be sure to enter 5 elements/values to be able to run the code error free. https://code.sololearn.com/cRXmxm8K7106/?ref=app

9th Mar 2022, 11:07 PM
Takudzwa A Svosve
Takudzwa A Svosve - avatar
5 Answers
+ 5
Any corrections and modifications are greatly appreciated. Please upvote and comment if you like the code/program.
9th Mar 2022, 11:08 PM
Takudzwa A Svosve
Takudzwa A Svosve - avatar
+ 5
SoloProg it works perfectly. Thanks for sharingđŸ€ https://code.sololearn.com/cXTph49Q2Ojq/?ref=app
10th Mar 2022, 12:12 AM
Takudzwa A Svosve
Takudzwa A Svosve - avatar
+ 4
William Owens, awesome. Thanks for sharing. đŸ€
10th Mar 2022, 6:29 AM
Takudzwa A Svosve
Takudzwa A Svosve - avatar
+ 1
// Good Luck int[] myArray = new int[5]; Console.WriteLine("Enter 5 elements: "); for (int i=0; i<myArray.Length; i++) myArray[i] = Convert.ToInt32(Console.ReadLine()); Console.Write("The array contains the elements "); Console.WriteLine(
quot;[ {string.Join(", ", myArray)} ]"); https://code.sololearn.com/caZg0jXu08Tj
9th Mar 2022, 11:47 PM
SoloProg
SoloProg - avatar
+ 1
Change from 5 to user defined array size. https://code.sololearn.com/c7CfoBW858xk/?ref=app
10th Mar 2022, 2:43 AM
William Owens
William Owens - avatar