Rutherford Appleton Laboratory

Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.
Highlighted

User Group Challenge - June 2015 - Number Rotation

Challenge:

Create a VI that will determine the largest integer that can result from performing a series of any number of digit rotations on an inputted integer.

The VI must perform at least 1 digit rotation. Digit rotations can be in either direction (moving the first digit to the end of the number or moving the last digit to the front of the number), but the series must always go in the same direction. If there are any leading zeros after digit rotation they must be removed. The Inputted integer will always be positive.

0 Kudos
Message 1 of 3
(3,727 Views)
2 REPLIES

Re: User Group Challenge - June 2015 - Number Rotation

Here's my attempt.

I mis-interpreted the 'Digit rotations can be in either direction' bit, I thought this meant you could chose so it only goes one way.

Also leading zeroes are removed (or, not displayed anyway) but this doen't carry on to the next rotation - as it wasn't explicitly asked for :-p

For fun I added a spinning graphic that is supposed to slow down then stop and give the answer.

0 Kudos
Message 2 of 3
(2,539 Views)

Re: User Group Challenge - June 2015 - Number Rotation

0 Kudos
Message 3 of 3
(2,539 Views)
Reply
This is an open group. Sign in and click the "Join Group" button to become a group member and start posting.