Rhmag
2011-10-11 18:41:35 UTC
My output comes out as:
You can remove these colors: red
yellow
green
How do I make the output on the same line? Like this:
You can remove these colors: red yellow green
Thanks!
part of code:
if(day < 4 && day != 0) {
System.out.print("You can remove these colors:");
}
if (day < 4 && day%3 != 0) {
System.out.println(" red");
}
if(day < 4 && day%2 == 0 && day%5 != 0 && day > 0) {
System.out.println(" yellow");
}
if (day < 4 && day%2 == 0 && day != 0 && day > 0) {
System.out.println(" green");