So the problem is to get two words from the user and then see if they cross and if they do type them out like the example:
word1= lottery
word2= boat
Crosses would be:
b
lottery
a
t
b
o
a
lottery
b
o
a
lottery
I am pretty lost, but I know that it is probably easiest to make a 2 dimensional array and go from there.
Here is what I have so far:
Any ideas/suggestions/anything will help.
Thanks
public class Cross
{
public static void main(String[] args)
{
//Creates a two dimensional array for the inputs
private String[][] cross = new String[w1pos][w2pos];
//Getting the words from the user
Scanner kbd = new Scanner(System.in);
System.out.println("Enter first word: ");
String word1 = input.next();
System.out.println("Enter second word: ");
String word2 = input.next();
//Turn words into arrays
//See if words cross
//write first word horizontally
//write second word vertically
//make the words cross at matching letters
//print crossing
}
}