This discussion is closed.
AT82
Badges: 0
Rep:
?
#1
Report Thread starter 16 years ago
#1
I've virtualy finished ironing out all the books in my site now

http://www.robertson-i.co.uk/shop/

however there is still a small book. If the items added up in the basket come to a total thats a whole number i.e £100 it displays as £100 and not £100.00.

Does anybody know how I can tell it to add the two decimal places at the end if they are zero?
0
EI_123
Badges: 0
Rep:
?
#2
Report 16 years ago
#2
(Original post by amazingtrade)
I've virtualy finished ironing out all the books in my site now

http://www.robertson-i.co.uk/shop/

however there is still a small book. If the items added up in the basket come to a total thats a whole number i.e £100 it displays as £100 and not £100.00.

Does anybody know how I can tell it to add the two decimal places at the end if they are zero?
Pseudo-Code:

if (abs(NUMBER) == NUMBER) //there isn't a decimal part in the number
{
NumberStr += ".00.";
}
0
X
new posts
Back
to top
Latest
My Feed

See more of what you like on
The Student Room

You can personalise what you see on TSR. Tell us a little about yourself to get started.

Personalise

Do you get study leave?

Yes- I like it (228)
61.29%
Yes- I don't like it (16)
4.3%
No- I want it (103)
27.69%
No- I don't want it (25)
6.72%

Watched Threads

View All