Plz Java program for this pattern | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Plz Java program for this pattern

12345 23451 34512 45123

19th Jul 2017, 5:07 PM
mahendra
4 Answers
+ 2
Convert input into string, make a loop that : - copy the first character into a temp var - move 4 last character back, each 1 step back - put back the temp var into 5th character
19th Jul 2017, 6:03 PM
Ipang
+ 1
A hint for you; you'll need to use modulus.
19th Jul 2017, 5:26 PM
Keto Z
Keto Z - avatar
0
there are so many ways to do this. The first thing that popped on my mind was using nesting loops
20th Jul 2017, 5:40 PM
Mlandvo Mesh Dlamini
Mlandvo Mesh Dlamini - avatar
21st Jul 2020, 1:05 AM
shubham kumar
shubham kumar - avatar