I am a beginner. I need to create a table in visual c# such that the number of rows would be created based on user input. The number of colums is 3. For example, if a user enters 3 as the input, a table of 3 rows would be created. If he enters 5, a table of 5 rows would be created.

Are you using a Console or a Forms application?

Since your post is tagged Visual, I'll assume this is a Forms application. Examine the properties and methods of the ListView class, if necessary you can probably find tutorials on using it online. This class can be configured to show a grid and it can be set for any number of columns and rows.