How many decimal places???? ie.. 1234.567 can be multiplied by 100 to give 1234567 then you can insert the decimal place... Its so easy to write a decimal to ascii routine that places a decimal point.
thank u all of u
no question when decimal comes 2 or 3 or 4 digit but what if "1234.123456789123455678898" simply its in double or 32 bit decimal, what i actually need is if number is 1234.1234 then ans=1234 i don't need numbers after decimal /fractional
waiting for valuable help
thank u all of u
no question when decimal comes 2 or 3 or 4 digit but what if "1234.123456789123455678898" simply its in double or 32 bit decimal, what i actually need is if number is 1234.1234 then ans=1234 i don't need numbers after decimal /fractional
waiting for valuable help
If you have sprintf function, you can do something like this:
char buffer[20];
float value = 1234.5678;
sprintf(buffer, "%.0f", value);
// after that the string "1234" is in the buffer. You can change the number of digits after decimal point; Two digits after decimal point: sprintf(buffer, "%.2f", value);