Converting pence into pounds help
I want to convert a pence value to pounds.
So I have something like this:
But its the pence im stuck on.
Can anyone help me out.
Thanks in advance.
So pence is like 1 cent, and a pound is 100 cents?
The problem here is that you should end up with 58. The reason is that 256 % 100 is 56, and 256 / 100 (as integer) is 2.
So up to the return the values are still good to work with. You have pounds as 2 and pence as 56. Its the addition that you need to modify (as one of the several approaches), and you can simply
Ultimately, if its just 100 pence per pound, then you can simply
Thanks so much it works.
Yes pence is like 1 cent, and a pound is 100 cents, either way you got the idea.
|All times are GMT +1. The time now is 02:12 PM.|
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.