0
make coding a program to display the output as below (with do while) :
high hill : 4 //input the amouny of the hill : 2 //input output : * ** *** **** *** ** * * ** *** **** *** ** *
12 Answers
+ 23
need *answer
+ 11
@Leon lit Have you got some time to do it? I'm afk now...
+ 10
@Ike What is your question? You see that people don't get it. Pls add some more description.
+ 8
for(int i=0; i < B; i++)
{
for(int x=1; x < 2 * A; x++)
{
for(int j=0; j < ((x <= A) ? x : (2 * A) - x); j++)
{
System.out.print("*");
}
System.out.println();
}
}
+ 6
need question || need answers đđđ
+ 6
are you asking how to make a pattern like that???
+ 6
//A is the high hill : 4
//B is the amouny of the hill : 2
int i = 0;
while(i < B)
{
int x = 1;
while(x < 2 * A)
{
int j = 0;
while(j < ((x <= A) ? x : (2 * A) - x))
{
System.out.print("*");
j++;
}
System.out.println();
x++;
}
i++;
}
//This will do the work. :)
+ 4
A slow and long and ugly but recursive solution:
https://code.sololearn.com/cdyHiCsM0Qto/?ref=app
0
yes Helpe me plis
0
done add descriptions
- 1
no.
question with while no for