Search:

Type: Posts; User: Necator

Search: Search took 0.33 seconds.

  1. Re: New Method array to String or just print as Array?

    i got it, i just put i=0 in the for loop, so he calculated 1-0 endless in the while loop.
  2. Re: New Method array to String or just print as Array?

    If i just put ggT(5) in, theres printed nothing,
    if i put ggT(5,23) in (2 parameters) then both prints come once so in this case it works perfectly.
  3. Re: New Method array to String or just print as Array?

    public static int ggT(int a, int b) {
    System.out.println(3);
    while(a!=b){
    if(a>b) {
    a=a-b;
    } else {
    b=b-a;
    }...
  4. Re: New Method array to String or just print as Array?

    nah, just the while loop itself works, so i guess the problem is within the call of the method.
  5. Re: New Method array to String or just print as Array?

    i just put some in there aswell, it seemed to compile quite right. Also if i test ggT(2,23) (with 2 parameters), so it should take the method named the same (ggT) with 2 parameters, with the while...
  6. Re: New Method array to String or just print as Array?

    ok, i tested it, the problem seems to be in this part


    for(int i=0; i<=1000; i++) {
    array[i][0] = i;
    array[i][1] = ggT(a,i);

    any suggestions?
    the ggT parts seems...
  7. Re: New Method array to String or just print as Array?

    if i just ggT(5,23), it works properly, so i dont think the while loop is the problem.
  8. Re: New Method array to String or just print as Array?

    its the same result if u just take 10.
    So u dont see any problems by checking it?
  9. Re: New Method array to String or just print as Array?

    it compiles, but it doesnt print anything. I just let it calculate for around 2 minutes. Should be enough time for this little work.

    Thx for the link to the announcement, just edited it.
  10. New Method array to String or just print as Array?

    Hey guys,

    i'm sure u're able to help me. I just tried to fill an array with some numbers, calculated by a other function.
    I just tried to print this array as array, but it doesnt work.
    Maybe...
Results 1 to 10 of 10