212k views
0 votes
How can i fix my code so that a teepee is properly formed? here is what i currently have (my output is uploaded as an image):

public static void teepee(int a){
for(int i=a; i>0; i--){
for(int j=a; j>0; j--){
System.out.print(" ");
}
System.out.print("/");
for(int k=i; k System.out.print(" ");
}
System.out.println("\\");
}
}

How can i fix my code so that a teepee is properly formed? here is what i currently-example-1
User Motombo
by
5.4k points

1 Answer

2 votes
We are not sending them any other one tryin was there to a point that they had been doing the work for the first
User Alexander Gorg
by
4.7k points