Skip to main content
added 76 characters in body
Source Link

Java

JAVA
I I was inspired from the sample of how not to do it.

class TheNumbers 
{
    public static void main(String[] args) {
    
    int FOUR = 9+9-7-7;
    int EIGHT = 9+9-7-7 + 9+9-7-7;
    int FIFTEEN = (9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9 - 7)/(9-7);
    int SIXTEEN = 9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7;
    int TWENTY_THREE = (9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 +  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9-7 + 9-7+ 9-7)/(9-7);
    int FOURTY_TWO =  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 +  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9-7;
    
    for(int n = 0;;) System.out.println(
        n == FOUR ? n = EIGHT :
        n == EIGHT ? n = FIFTEEN :
        n == FIFTEEN ? n = SIXTEEN :
        n == SIXTEEN ? n = TWENTY_THREE :
        n == TWENTY_THREE ? n = FOURTY_TWO : (n = FOUR)
        );
    }
}

}

Edited so that I do not use the numbers 1,2,3,4,5,6,8,0 anywhere. I originally had things like 14+1 to avoid using 15, but there is a 1 and a 4 that I am not allowed to use.

Sweet, I got upvotes?! I thought this would be ignored or even possibly downvoted xD <3

JAVA
I was inspired from the sample of how not to do it.

class TheNumbers 
{
public static void main(String[] args) {

int FOUR = 9+9-7-7;
int EIGHT = 9+9-7-7 + 9+9-7-7;
int FIFTEEN = (9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9 - 7)/(9-7);
int SIXTEEN = 9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7;
int TWENTY_THREE = (9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 +  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9-7 + 9-7+ 9-7)/(9-7);
int FOURTY_TWO =  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 +  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9-7;

for(int n = 0;;) System.out.println(
    n == FOUR ? n = EIGHT :
    n == EIGHT ? n = FIFTEEN :
    n == FIFTEEN ? n = SIXTEEN :
    n == SIXTEEN ? n = TWENTY_THREE :
    n == TWENTY_THREE ? n = FOURTY_TWO : (n = FOUR)
    );
}

}

Edited so that I do not use the numbers 1,2,3,4,5,6,8,0 anywhere. I originally had things like 14+1 to avoid using 15, but there is a 1 and a 4 that I am not allowed to use.

Sweet, I got upvotes?! I thought this would be ignored or even possibly downvoted xD <3

Java

I was inspired from the sample of how not to do it.

class TheNumbers 
{
    public static void main(String[] args) {
    
    int FOUR = 9+9-7-7;
    int EIGHT = 9+9-7-7 + 9+9-7-7;
    int FIFTEEN = (9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9 - 7)/(9-7);
    int SIXTEEN = 9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7;
    int TWENTY_THREE = (9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 +  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9-7 + 9-7+ 9-7)/(9-7);
    int FOURTY_TWO =  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 +  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9-7;
    
    for(int n = 0;;) System.out.println(
        n == FOUR ? n = EIGHT :
        n == EIGHT ? n = FIFTEEN :
        n == FIFTEEN ? n = SIXTEEN :
        n == SIXTEEN ? n = TWENTY_THREE :
        n == TWENTY_THREE ? n = FOURTY_TWO : (n = FOUR)
        );
    }
}

Edited so that I do not use the numbers 1,2,3,4,5,6,8,0 anywhere. I originally had things like 14+1 to avoid using 15, but there is a 1 and a 4 that I am not allowed to use.

Sweet, I got upvotes?! I thought this would be ignored or even possibly downvoted xD <3

added 652 characters in body
Source Link

JAVA
I was inspired from the sample of how not to do it.

class TheNumbers 
{
public static void main(String[] args) {
 
int FOUR = for(9+9-7-7;
int nEIGHT = 0;;)9+9-7-7 System.out.println(+ 9+9-7-7;
int FIFTEEN = (9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + n9+9-7-7 ==+ 9+9-7-7 + 9 - 7)/(3+19-7);
int ?SIXTEEN n= 9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7;
int TWENTY_THREE = (7+1)9+9-7-7+9+9-7-7 :
+ 9+9-7-7+9+9-7-7 +  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 + n9+9-7-7 ==+ (7+1)9+9-7-7 ?+ n9-7 =+ 9-7+ 9-7)/(14+19-7) :;
int FOURTY_TWO =  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 + n ==9+9-7-7+9+9-7-7 (14+1)+ ?9+9-7-7+9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9-7;

for(int n = (14+20;;) :System.out.println(
    n == FOUR ? n = EIGHT :
    n == (14+2)EIGHT ? n = (22+1)FIFTEEN :
    n == FIFTEEN ? n = SIXTEEN :
    n == (22+1)SIXTEEN ? n = (41+1)TWENTY_THREE : 
 (   n === (3+1))
TWENTY_THREE ? n = FOURTY_TWO : (n = FOUR);
    });
}

}

Edited so that I do not use the numbers 1,2,3,4,5,6,8,0 anywhere. I originally had things like 14+1 to avoid using 15, but there is a 1 and a 4 that I am not allowed to use.

Sweet, I got upvotes?! I thought this would be ignored or even possibly downvoted xD <3

JAVA
I was inspired from the sample of how not to do it.

class TheNumbers 
{
public static void main(String[] args) {
    for(int n = 0;;) System.out.println(
        n == (3+1) ? n = (7+1) :
        n == (7+1) ? n = (14+1) :
        n == (14+1) ? n = (14+2) :
        n == (14+2) ? n = (22+1) :
        n == (22+1) ? n = (41+1) : (n = (3+1))
        );
    }
}

Sweet, I got upvotes?! I thought this would be ignored or even possibly downvoted xD <3

JAVA
I was inspired from the sample of how not to do it.

class TheNumbers 
{
public static void main(String[] args) {

int FOUR = 9+9-7-7;
int EIGHT = 9+9-7-7 + 9+9-7-7;
int FIFTEEN = (9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9 - 7)/(9-7);
int SIXTEEN = 9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7;
int TWENTY_THREE = (9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 +  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9-7 + 9-7+ 9-7)/(9-7);
int FOURTY_TWO =  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 +  9+9-7-7+9+9-7-7 + 9+9-7-7+9+9-7-7 + 9+9-7-7 + 9+9-7-7 + 9-7;

for(int n = 0;;) System.out.println(
    n == FOUR ? n = EIGHT :
    n == EIGHT ? n = FIFTEEN :
    n == FIFTEEN ? n = SIXTEEN :
    n == SIXTEEN ? n = TWENTY_THREE : 
    n == TWENTY_THREE ? n = FOURTY_TWO : (n = FOUR)
    );
}

}

Edited so that I do not use the numbers 1,2,3,4,5,6,8,0 anywhere. I originally had things like 14+1 to avoid using 15, but there is a 1 and a 4 that I am not allowed to use.

Sweet, I got upvotes?! I thought this would be ignored or even possibly downvoted xD <3

added 89 characters in body
Source Link

JAVA
I was inspired from the sample of how not to do it.

class TheNumbers 
{
public static void main(String[] args) {
    for(int n = 0;;) System.out.println(
        n == (3+1) ? n = (7+1) :
        n == (7+1) ? n = (14+1) :
        n == (14+1) ? n = (14+2) :
        n == (14+2) ? n = (22+1) :
        n == (22+1) ? n = (41+1) : (n = (3+1))
        );
    }
}

Sweet, I got upvotes?! I thought this would be ignored or even possibly downvoted xD <3

JAVA
I was inspired from the sample of how not to do it.

class TheNumbers 
{
public static void main(String[] args) {
    for(int n = 0;;) System.out.println(
        n == (3+1) ? n = (7+1) :
        n == (7+1) ? n = (14+1) :
        n == (14+1) ? n = (14+2) :
        n == (14+2) ? n = (22+1) :
        n == (22+1) ? n = (41+1) : (n = (3+1))
        );
    }
}

JAVA
I was inspired from the sample of how not to do it.

class TheNumbers 
{
public static void main(String[] args) {
    for(int n = 0;;) System.out.println(
        n == (3+1) ? n = (7+1) :
        n == (7+1) ? n = (14+1) :
        n == (14+1) ? n = (14+2) :
        n == (14+2) ? n = (22+1) :
        n == (22+1) ? n = (41+1) : (n = (3+1))
        );
    }
}

Sweet, I got upvotes?! I thought this would be ignored or even possibly downvoted xD <3

Source Link
Loading