Mport Javautilscanner Public Class Wordsearch Public Static Void Main String Args Scanner Q37076579

mport java.util.Scanner;

public class WordSearch

{

public static void main(String args[ ])

{

   Scanner keyboard = new Scanner(System.in);

   String puzzleData;

   String wordToFind;

   int wordLength; //of word to find

   int pRow; //for 2D array size determined byuser

   int pCol;

   int nbrOfChars; //store calculation of char neededin String puzzle data based on puzzle dimensions

   boolean found = false; //used to check if found ina direction

   //Get Data

  

   System.out.print(“How many rows in the puzzle?”);

   pRow = keyboard.nextInt();

   System.out.print(“How many columns in the puzzle?”);

   pCol = keyboard.nextInt();

   keyboard.nextLine(); //eat enter char in input filestream after an int input

   char [][]wordSearch = new char [pRow][pCol];

   nbrOfChars= pRow * pCol;

  

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.