Hello,
when i declare the variable:
double num = 1.928761821237;
if i want to display it with proper formatting, i will use a printf and set the number of digits i will display. Assuming i now want to truncate this number in memory to
num = 1.92876;
is there any way to do this and disregard the numbers that follow?
thanks
when i declare the variable:
double num = 1.928761821237;
if i want to display it with proper formatting, i will use a printf and set the number of digits i will display. Assuming i now want to truncate this number in memory to
num = 1.92876;
is there any way to do this and disregard the numbers that follow?
thanks
Comment