+ 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
5 Réponses
+ 5
Any corrections and modifications are greatly appreciated. Please upvote and comment if you like the code/program.
+ 5
SoloProg it works perfectly. Thanks for sharing🤝
https://code.sololearn.com/cXTph49Q2Ojq/?ref=app
+ 4
William Owens, awesome. Thanks for sharing. 🤝
+ 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
+ 1
Change from 5 to user defined array size.
https://code.sololearn.com/c7CfoBW858xk/?ref=app