Question Details

[solution] » I'm having trouble creating a 2d array from a txt input file

Brief item decscription

Step-by-step solution file

Item details:

I'm having trouble creating a 2d array from a txt input file

I'm having trouble creating a 2d array  from a txt input file using c#.  Suppose my input file is


The line is 81 characters long and I need a 9*9 array.

Ive tried using getchar() in a way like this.

while((c=getchar()) != EOF){



        puzzle[row][col] = c;

However when I try to print the array out it just repeats a bunch of numbers and the output is way more than 81 characters.

using System; using System.IO; public class MainClass { static void Main(string args) { StreamReader MyStreamReader = new StreamReader(&quot;file.txt&quot;); for (int i = 0; i &lt; 81; i++) { int...


About this question:

This question was answered on: Feb 21, 2020

PRICE: $24 (18.37 KB)

Buy this answer for only: $24

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card. All your purchases are securely protected by PayPal.

Need a similar solution fast, written anew from scratch? Place your own custom order

We have top-notch tutors who can help you with your essay at a reasonable cost and then you can simply use that essay as a template to build your own arguments. This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student. New solution orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

Order Now