0

why i input big number the column line will wrong placing

using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { String column, row; int Column, Row; String rowLine = "----- "; String colLine = "|"; Console.WriteLine("Enter Table Column: "); column = Console.ReadLine(); Column = Convert.ToInt32(column); Console.WriteLine("Enter Table Row: "); row = Console.ReadLine(); Row = Convert.ToInt32(row); for (int i = 0; i < Column; i++){ rowLine+="----- "; colLine+=" |"; } for (int i = 0; i <= Row; i++){ Console.WriteLine(rowLine); if (i < Row){ Console.WriteLine(colLine); } } } } }

12th Feb 2019, 9:45 AM
韩欣
韩欣 - avatar
1 Antwort
0
Please elaborate more. Is there input which show the expected output ? What is the number which shows the error ? Can you put the code in the playground ?
13th Feb 2019, 8:17 AM
sneeze
sneeze - avatar