I'm having trouble with this exercise - I get the correct output which is highlighted in green but the final line where it says "All Your Output" is highlighted in red. I'm assuming the problem is with the 3rd part - my code for that is as follows:
n = in.nextInt();
cont...
String word = "";
for(int i=0; i<n; i++){
//fill in code to get one word of input and print "Hi word!"
word = in.next();
System.out.println("Hi " + word);
}
Victoria Holland
Feb 11, 10:13 AMI'm having trouble with this exercise - I get the correct output which is highlighted in green but the final line where it says "All Your Output" is highlighted in red. I'm assuming the problem is with the 3rd part - my code for that is as follows:
n = in.nextInt();