Hello everyone,
I am writing a small app that calculates the correct number of Red Blood Cells per Litre of whole blood.
It is based on enterinf the counts seen in 5 squares through a microscope, and then running this total through some math routines.
here is an example.
1) Count and enter the cells as seen through the microscope, this totals (as an example) 2500
2) Multiply this by the dilution factor of 200
3) Multyply by 10,000 (This is the factor used to get cells per ml of blood)
4) Multyply this by 1000 to get a total cell count per litre.
Using the above, and using a double my application correctly produces the following number of cells per litre
5000000000000
I now want my application to correctly show the science version below
5.00 X 10^12 /L
so, first of all I want to format the number to 2 decimal places, so we would have 5.00 or 3.45 or 6.88 etc etc,
and, secondly, I want to be able to display X 10^12 as the power, however, if the cell count was very low, it may be as an example
1.74 X 10^10 and not 5.00 X 10^12 (ie the 10th power and not the 12th power)
So how would I format the number to 2 decimal places, rounding it up AND display the correct science notation or power?
Thank you VERY much for advice, I am still learning.
p.s. I am outputting the value, e.g 5.25 in a colum on a list box, and the power, e.g. X 10^12 in the next colum on the list box.
Kind Regards,
Steve