I read somewhere that AVRstudio rounds down numbers, so if I have 9.7, it will actually turn to 9. Is that correct?
Because I want to split a two digit number into two digits.
Is there a different method I can do?
Code:
int temp;
temp = Double Digits/10
temp*10 = First_digit
second_digit = Double_digits- first_digit
Example:
Double_digits = 15
15/10 = 1.5 , rounds down to 1 .
First digit = 1*10
Second_digit = 15 -10 = 5