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
More:

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

1.34..7.9.56.89.23.891.34.6214.65.973..8.7.148.7.14.65.31.4.97864.97.531.78..1042

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){

for(row=0;row<9;row++)

    for(col=0;col<9;col++)

        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:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: Feb 21, 2020

PRICE: $24

Solution~00065859474.zip (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.
SiteLock

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