+ 2
Does OR work with ternary?
//Dosen't seem to like the || operator int j = 14 ; while(j>0){ txt(j>5?" ":j>6?||j>9?".":"*");--j; }
6 ответов
+ 3
Try:
j>6 || j>9 ?
Instead of:
j>6 ? || j > 9
+ 2
oh wait that didnt work either.. the txt is a static void print method btw
i got an expression error
+ 2
You removed the wrong question mark. Take a good look at @ace's comment! 😛
+ 1
//here the whole thing
public class Program
{
static void txt(String x){System.out.print(x);}
public static void main(String[] args) {
int j = 14 ;
while(j>0){txt(j>5?" ":j>6?||j>9".":"*");--j;}
}}
+ 1
😥@ faith i dont understand i removed the ? after j>6 but i keep getting the same error... what did i miss restore my faith 😋