+1 714-215-3097

(Solved) : Write Simplistic Recursive Java Code Sierpinski Made Psuedo Code Tell Anything Wrong X Lef Q35589558

Write simplistic recursive Java code for Sierpinski

I made a psuedo code tell me if anything wrong with it:

// x – left edge, y – right edge, z – peak, num – numberof times the program is supposed to run

public void drawTriangle (int x, int y, int z, intnum)

maketriangle(x,y,z); //imaginary method to createtriangle using coordinates.

if (num == 0) {



else {

int midxy = (y-x)/2;

int midxz = (z-x)/2;

int midyz = (z-y)/2;

drawTriangle(x, midxy, midxz, num);

  drawTriangle(y, midxy, midyz,num);

  drawTriangle(z, midxz, midyz,num);




Please note you must find problems in the above simple code thatI wrote and also write the code which will take coordinates of 3points instead of 3 points. The parameters for the method that youwrite will contain 7 parameters.

Leave a Reply

Your email address will not be published. Required fields are marked *