[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.10244650 [View]
File: 38 KB, 817x322, numGenJava.jpg [View same] [iqdb] [saucenao] [google]
10244650

To help with syntax and number generation (since i realized you'd need to do a healthy mix of string and integer mixing which might be daunting):

1. Randomize the numbers x, y and z

2. Create a string "0b00"

3. Convert x, y and z to binary (google it).

4. Concatenate the string "00" + Integer.toString(x, 2) + ...

See pic related for full code, apparently 0b wasn't convention in java when it comes to converting.

Navigation
View posts[+24][+48][+96]