How do i enter input for this code? I find it hard to enter input in sololearn #code_playground. | Sololearn: Learn to code for FREE!

+5

How do i enter input for this code? I find it hard to enter input in sololearn #code_playground.

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace SoloLearn { class Program { static void Main(string[] args) { Console.Write("Enter a positive integer: "); int n = int.Parse(Console.ReadLine()); int[] array = new int[n]; Console.WriteLine("Enter the values of the array:"); for (int i = 0; i < n; i++) { array[i] = int.Parse(Console.ReadLine()); } bool symmetric = true; for (int i = 0; i < array.Length/2; i++) { if (array[i] != array[n - i - 1]) { symmetric = false; break; } } Console.WriteLine("Is symmetric? {0}", symmetric); } } }

3/14/2017 1:29:22 PM

Wilson Bol

1 Answer

New Answer

+11

You need to input all the values for ReadLine at the start of the program, separated by line break.