Search:

Type: Posts; User: agy92

Search: Search took 0.08 seconds.

  1. Thread: Exercise problem

    by agy92
    Replies
    19
    Views
    1,840

    Re: Exercise problem

    I'm sorry! I forgot to say, but the point is equal to 0 instead of the asterisk is equal to 1!


    in my first post there are all the details!
  2. Thread: Exercise problem

    by agy92
    Replies
    19
    Views
    1,840

    Re: Exercise problem

    Thank you anyway. The output is an array that contains dots or zeros according to box k. The solution that I thought I was taking my first block of the matrix 3 ^ n then the first matrix 3 ^ n-1 (the...
  3. Thread: Exercise problem

    by agy92
    Replies
    19
    Views
    1,840

    Re: Exercise problem

    do you mean by power? What is not clear? the exercise asks you to print the magic carpet with power n and k we have chosen that would be the square of the matrix numbered ... I posted my code to...
  4. Thread: Exercise problem

    by agy92
    Replies
    19
    Views
    1,840

    Re: Exercise problem

    I try to post it in the right way. My problem is that I need the solution within 12 hours .... so please help me because they do not really know how to do ... I do not know if my code is completely...
  5. Thread: Exercise problem

    by agy92
    Replies
    19
    Views
    1,840

    Re: Exercise problem

    <import java.io.*;
    import java.util.*;

    class Magic_Carpet {
    int[][] m;
    int k;
    int num=1;
    Magic_Carpet(int n,int k){
    this.m=new int[(int)Math.pow(3,n)][(int)Math.pow(3,n)];
    this.k=k;
  6. Thread: Exercise problem

    by agy92
    Replies
    19
    Views
    1,840

    Re: Exercise problem

    now i work with post#5...
  7. Thread: Exercise problem

    by agy92
    Replies
    19
    Views
    1,840

    Re: Exercise problem

    I try to write the algorithm to print the magic carpet using recursion ... but I lose indices .... I thought that for the initial matrix 3 ^ n I have to cut it into 9 parts and then each part in...
  8. Thread: Exercise problem

    by agy92
    Replies
    19
    Views
    1,840

    Re: Exercise problem

    <import java.io.*;
    import java.util.*;

    class Magic_Carpet {
    int[][] m;
    int k;
    int num=1;
    Magic_Carpet(int n,int k){
    this.m=new int[(int)Math.pow(3,n)][(int)Math.pow(3,n)];
    ...
  9. Thread: Exercise problem

    by agy92
    Replies
    19
    Views
    1,840

    Re: Exercise problem

    import java.io.*;
    import java.util.*;




    class Tappeto_Magico {
    *int[][] m;
    *int k;
    *int num=1;
  10. Thread: Exercise problem

    by agy92
    Replies
    19
    Views
    1,840

    Exercise problem

    Hello .. I would like to help with this exercise. I think it has to do with recursion .... but I do not have a clear idea.

    A magic carpet of order n (0 ≤ n ≤ 5 ) and parameter k (0 ≤ k <9 ) `
    and...
Results 1 to 10 of 10