0
Can anyone help we with printing the text below using while loop.
* 1 *** 3 ***** 5 ******* 7 ***** 5 *** 3 * 1 https://code.sololearn.com/cB7lbD9aLris/
11 Respuestas
+ 5
yes... but i=i+2
now adding number
and then the same from 5 to 1 and you are done!
+ 4
Hi roby,
what have u tried so far?
please show attempt!
+ 3
roby lax you need to show your attempt so as to be helped, atleast link your code here with your post.
Happy coding 😊 Keep coding 🙏
+ 2
int p=5;
Int col=0;
int n=5;
while(col ‹p){
int row = 0;
while(row ‹n){
system.out.print("*");
row++;
}
n=n-2;
System.out.print(n);
System.out.println();
col++;
}
}}
It prints only have of the programme without numbers..
That's all i could figure out
+ 2
roby lax
I think she means this:
one while loop for printing this pattern
*1
***3
****5
*******7
And now another while loop, for printing from 5 to 1, like you did in your code stara.
+ 1
not so bad my friend!
can u change your prog so it makes pattern from 1 to 7?
not too much to change.
+ 1
Hey look, if You like it...
https://code.sololearn.com/cODH9sa20GMx/?ref=app
0
Here you go
https://code.sololearn.com/cB7lbD9aLris/?ref=app
0
https://code.sololearn.com/clqRnxd0f9oO/?ref=app
0
I'm sorry but i didn't get you oma..
And how do we create a reverse pattern?
0
Thank you mr.Waseem