The loop terminates when "xxxxx" is read in. If the word is land, the string followed by "land" get outputted. The same with air, and water.
Explanation:
int land = 0;
int air = 0;
int water = 0;
String word = "";
while(!(word.equals("xxxxx"))) {
word = stdin.next();
if(word.equals("land")) {
land++;
}else if(word.equals("air")) {
air++;
}else if(word.equals("water")) {
water++;
}
}
System.out.println("land:" + land);
System.out.println("air:" + air);
System.out.println("water:" + water);
<span>began operating in 1995
shongololo means </span><span> “to roll up”
non- profit organization </span>
True however it’s also depends on where you live but for this purpose it’s true
Answer:
The second one:
int sum = 0; for (int i = 0; i < values.length; i++) { if ((values[i] % 2) == 0) { sum += values[i]; } }