Arduino Forum
printing float
Forum 2005-2010 (read only)
General
Frequently-Asked Questions
system
March 5, 2009, 6:49pm
2
Because you've asked for integer division. 5 and 2 are integers! Try this:
val = 5.0 / 2.0;
show post in topic
Related topics
Topic
Replies
Views
Activity
Lolll problems making a simple división, the result is always 0
Programming
7
1224
May 5, 2021
Help with float numbers
Programming
10
2162
May 5, 2021
Float Math do not work as expected
Programming
3
682
May 5, 2021
Problems using System.println with a floar variable
Programming
7
1774
May 5, 2021
variable of type float
Programming
13
2609
May 5, 2021