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!
Type: Posts; User: agy92
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!
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...
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...
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...
<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;
now i work with post#5...
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...
<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)];
...
import java.io.*;
import java.util.*;
class Tappeto_Magico {
*int[][] m;
*int k;
*int num=1;
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...