0

Can someone help me with this pattern?

1 2 0 2 3 0 0 0 3 4 0 0 0 0 0 4 5 0 0 0 0 0 0 0 5

22nd Apr 2020, 6:09 AM
Animesh Dwivedi
Animesh Dwivedi - avatar
10 Answers
+ 1
What inputs would you like to enter to make it print this pattern? I.e. start with 2 and add by one to outside variable and add two 0s to middle 0s each time it increments by one ?
22nd Apr 2020, 6:27 AM
David Nierman
David Nierman - avatar
+ 1
Thanks for ur help really appreciate ur time 😊
22nd Apr 2020, 5:11 PM
Animesh Dwivedi
Animesh Dwivedi - avatar
0
Do you want to create that pattern using java ?
22nd Apr 2020, 6:23 AM
David Nierman
David Nierman - avatar
0
Yes
22nd Apr 2020, 6:25 AM
Animesh Dwivedi
Animesh Dwivedi - avatar
0
actually I forgot to write 1 the pattern starts from 1
22nd Apr 2020, 6:33 AM
Animesh Dwivedi
Animesh Dwivedi - avatar
0
No worries. So the pattern is the outsides variables increases by one and the inside number of Is increases by two. So there will be two variables that will be modified by two functions. Please share what you have so far for your script and I can help.
22nd Apr 2020, 3:13 PM
David Nierman
David Nierman - avatar
0
That's all I have
22nd Apr 2020, 3:19 PM
Animesh Dwivedi
Animesh Dwivedi - avatar
22nd Apr 2020, 3:56 PM
David Nierman
David Nierman - avatar
0
I purposely do not have correct number of zeros between so you can learn how the code works and modify it to learn. Happy learning !
22nd Apr 2020, 3:57 PM
David Nierman
David Nierman - avatar
0
No problem post the modified code here when you figure it out :)
22nd Apr 2020, 6:11 PM
David Nierman
David Nierman - avatar