public static long [ ] parseCoins ( long value ) { long [ ] result = new long [ 3 ] ; if ( value < 0 ) return result ; long temp = value ; result [ 2 ] = temp % 100 ; temp = temp / 100 ; result [ 1 ] = temp % 100 ; result [ 0 ] = temp / 100 ; return result ; }
parse given coin value into number of gold sliver and copper