Yall i need some help from people who know

Yall i need some help from people who know
java.

>are you able to help a tard out?

If i have two arrays given, one is 200 long and filled with random numbers from 1-6.
The other array is 6 long and is suppost to add a star to every field with the same number as is present in the initial array.

Attached: 1541673547460.jpg (408x431, 12K)

I dont understand what you mean by star. Like increment a counter called star?

"*" that shit

If you need to maintain a separate count for each array element, you are going to need to create an array with the same length as one or both of the arrays.

Explain it correctly dude

Still not making sense.

Hold up I’ll write you the code

CS 1.6 was ok, but csgo is worse, because it uses the same engine, fuck you volvo give us source 2 you cheap fucks

implement a method which takes in a String array and an int array. For every time a number shows up in the int array, add a star (as in String aka "*") to the String array at the postition of that number.

too hard?^^

true

Attached: 1541692473379.png (391x397, 234K)

int arr1[200];
int arr2[6];
String result[6];

for(int i=0; i

are you replacing every value in the initial with a star that matches the value in the 6-long array for each field?

this is what its suppost to do

Attached: Screenshot_2019-06-02 2.png (516x134, 8K)

the String thats 200 long is filled with random numbers from 1-6

Int arr1[] = new int[200];
String arr2[] = new String[6];

//generate rands in arr1
...
//

//add * to arr2
for(int i = 0; i < 200; i++){
arr2[arr1[i]] += "*";
}

//assume array init is randomly filled with 200 values ranging from 1-6
String[] init
int[] OPisaFag; //this is the 6 value long array.
for(int k = 0;k < 6;k++){
int min = 0;
int max = init.length;

while(max >= min){
int mid = (min + max)/2;
if (Integer.parseInt(init[mid]) == OPisaFag[k])
{ init[mid] = “*”; }
if (Integer.parseInt(init[mid]) < OPisaFag[k])
{ min = mid+1; }
if (Integer.parseInt(init[mid]) > OPisaFag[k])
{ max = mid - 1; }
}
}

Fuck this was a bitch to type on my phone

fuck ignore this nevermind
I’ll rewrite it

use math.random

arr2 just needs to be String[7]

Op if you can't do this simple of a program get out of cs now

Fuckin faggots. I'm gonna write pseudo code because you're all retarded and I'm on my phone. Figure the goddamn indentation out in your own.

int[100] randoms; // this is the array that is filled with random
String[6] stars; // this'll be the one for the stars

for (i = 0; i < randoms.length; i++) {
stars[randoms[i]] += "*";
}

//assume array init is randomly filled with 200 values ranging from 1-6
int[] init;
String[] OPisaFag = new String[6];

for(int k = 0;k < 6;k++){
for(int x = 0;x < 200;x++){
if(k == init[x]) OpisaFag[k] += "*";
}
}

Attached: ray.png (500x280, 205K)

Oops I meant 200. You get the fuckin idea

Hi, excuse me, are you retarded?

This. I posted the same thing. Only a fuckin idiot couldn't write this. Look at the retarded solution someone else posted.

retarded

These are right

yeah OP, drop out of CS, you're retarded too

Attached: 1532067846037.jpg (429x410, 85K)

Excuse me what the blyat

>Everyone falling for the String[6] meme

Enjoy your index out of bound exception

Yeah ok but what the flying fuck is the third one

Only if you're retarded. math.random would give values 0-5 unless the person who wrote the generation code is also a retard

It's retardedly long, but it works
you know what nested for-loops are, right?

Yeah I know it works. But it's retarded. Why run a loop 1200 times when you can do it in 200?

>If i have two arrays given, one is 200 long and filled with random numbers from 1-6.

Attached: ceb20e99996fdbdced333a579ad2bd44debdb5d570218492eade6586a23540e7.jpg (625x416, 77K)

I don't know man, ask the shit for brains user that posted it

I read it. I understood it. But it's still retarded. The reason 0 indexing works so well is everything else is also zero indexed. If you do it right, you shouldn't have to worry about it.

>(int)(Math.random() * 6)+1

i dunno why this made me chuckle. probably cause im never gonna get over that word

interesting, i just wanted to see if yall could solve the (easy) question and yall went absolute batshit

Real great damage control there retard

Attached: 1548865098416.png (824x534, 1M)

Java? No thanks, already had my morning coffee.

Do these not have an index error caused by not accounting for 0?

nevermind I'm retarded.

//entire program
public class OPIsFaggot{
public static void main(String[] args){
String[] count = new String[6];
//assuming 200 int array is called array1
for(int i = 0;i