Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Find all instances of A-F in a character array, and replace them all with the user input character. When I try to print the Array

Find all instances of "A"-"F" in a character array, and replace them all with the user input character. When I try to print the Array with those parameters, it doesn't work. What am I doing wrong? Here is the original Arrayprivate char [][] LatinSquare= {{'7','A','B','2'}, {'C','2','8','D'}, {'E','7','2','F'} {'2','G','H','8'}}; 

image

87 When you find a letter in the square, ask the user to enter Replace the letter in the square with the digit. for(int i=0; i < DIM;i++) for(int j=0; j < DIM;j++) if (LatinSquare[i][j]=='A') { System.out.printf("A: "); char *= input.next().charAt(0); a-LatinSquare[0][1]; else if (LatinSquare[i][j]=='B') 88 // 89 90 { 91 92 { 93 94 95 96 97 98 } 99 00 { 01 02 03 04 } 05 06 { 07 08 09 10 11 12 13 14 15 16 } 17 18 { 19 20 234567 21 System.out.printf("B: "); char b= input.next().charAt(0); b-LatinSquare[0][2]; else if (LatinSquare[i][j]=='C') } System.out.printf("C: "); char = input.next().charAt(0); c=LatinSquare[1][0]; else if (LatinSquare[i][j]=='D') { System.out.printf("D: "); char d= input.next().charAt(0); d=LatinSquare[1][3]; else if (LatinSquare[i][j]=='') System.out.printf("E: "); char *= input.next().charAt(0); e-LatinSquare[2][0]; else if (LatinSquare[i][j]=='F') 22 } 23 24 { 25 26 27 28 } 29 30 31 36 mm mm mm m 32 33 34 35 System.out.printf("F: "); char = input.next().charAt(0); f=LatinSquare[2][3]; else if (LatinSquare[i][j]=='G') { } System.out.printf("G: "); char g= input.next().charAt(0); g=LatinSquare[3][2];

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Interplay The Process Of Interpersonal Communication

Authors: Ronald B. Adler, Lawrence B. Rosenfeld, Russell F. Proctor II

15th Edition

0197501346, 978-0197501344

More Books

Students also viewed these Programming questions

Question

35 Define in words the union of two events.

Answered: 1 week ago

Question

=+d. Let denote the proportion of defective items

Answered: 1 week ago