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 : * ** *** **** *** ** * * ** *** **** *** ** *

15th Apr 2017, 8:30 AM
Ike Antika
+ 23
15th Apr 2017, 8:33 AM
Valen.H. ~
+ 11
@Leon lit Have you got some time to do it? I'm afk now...
15th Apr 2017, 8:54 AM
Tashi N
+ 10
@Ike What is your question? You see that people don't get it. Pls add some more description.
15th Apr 2017, 8:45 AM
Tashi N
+ 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(); } }
15th Apr 2017, 8:54 AM
Cyrus Ornob Corraya
+ 6
need question || need answers 😕😕😕
15th Apr 2017, 8:37 AM
Leon lit
+ 6
are you asking how to make a pattern like that???
15th Apr 2017, 8:46 AM
Leon lit
+ 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. :)
15th Apr 2017, 9:09 AM
Cyrus Ornob Corraya
+ 4
A slow and long and ugly but recursive solution: https://code.sololearn.com/cdyHiCsM0Qto/?ref=app
15th Apr 2017, 10:57 AM
Tamás Barta
0
yes Helpe me plis
15th Apr 2017, 8:32 AM
Ike Antika
0