Page 1 of 1

Happy 4th! Special code for Atlanticmike and Binger

Posted: Mon Jul 04, 2022 3:30 pm
by doubtingthomas
Here is a special message for Atlanticmike and Binger in my code. It's very simple, shouldn't be hard to figure out what it says.
And happy 4th of July everyone!

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

String A = "Atlanticmike";
String B = "Binger";

int [] numbers = new int [26];

System.out.print (" " + A + " " + "can ");
theword(numbers);
System.out.print (" MY");
theword2(numbers);

System.out.print (" " + B + " " + "can ");
theword(numbers);
System.out.print (" MY");
theword2(numbers);

}

public static void theword (int [] numbers){
for (int i = 0; i < numbers.length; i++){
numbers = i + 64;

if (numbers == 73)
System.out.print ("K" + (char)numbers);

else if (numbers == 83)
System.out.print ((char)numbers + "$");
}
}

public static void theword2 (int [] numbers2){
for (int i = 0; i < numbers2.length; i++){
numbers2 = i + 64;

if (numbers2 == 65)
System.out.print (" " + (char)numbers2);

else if (numbers2 == 83)
System.out.print ((char)numbers2 + "S");
}
}
}

Re: Happy 4th! Special code for Atlanticmike and Binger

Posted: Mon Jul 04, 2022 5:50 pm
by canpakes
I got it! It’s, “Be Sure to Drink Your Ovaltine” …

Re: Happy 4th! Special code for Atlanticmike and Binger

Posted: Mon Jul 04, 2022 10:53 pm
by doubtingthomas
canpakes wrote:
Mon Jul 04, 2022 5:50 pm
I got it! It’s, “Be Sure to Drink Your Ovaltine” …

Alright, I'll change it to PG-13

Re: Happy 4th! Special code for Atlanticmike and Binger

Posted: Mon Jul 04, 2022 11:37 pm
by canpakes
Happy Fourth, DT! We’re about to dig into some BBQ chops, corn and tators. We’ll raise our glasses to you, and to all of the Forum folks. : )

Re: Happy 4th! Special code for Atlanticmike and Binger

Posted: Thu Jul 07, 2022 4:53 am
by drumdude
10 GOTO 20
20 GOTO 10


Oops just posted the secret recipe to Sic et Non’s incredible success.

Re: Happy 4th! Special code for Atlanticmike and Binger

Posted: Sun Jul 10, 2022 5:28 pm
by doubtingthomas
canpakes wrote:
Mon Jul 04, 2022 11:37 pm
Happy Fourth, DT! We’re about to dig into some BBQ chops, corn and tators. We’ll raise our glasses to you, and to all of the Forum folks. : )

Thanks, canpakes, hopefully, you had a great fourth of July.