float

Solutions on MaxInterview for float by the best coders in the world

showing results for - "float"
Isabella
15 Jun 2018
1<div style="clear:both;"></div>
Stefania
31 Jun 2016
1#Float or int like this - 2.6, 5.7, 1.89 etc
2
3a = 90.7
4print(a, 'is a float')
Valentino
12 Jan 2018
1final float x = 0.1f;
2
3x += 1;
4// Am i dum
Rafael
23 Jan 2018
1a = "Her name is "
2b = "Isabella"
3c = a + b
Micaela
19 Jan 2020
1float myNum = 5.75F;
2Console.WriteLine(myNum);
3
Teo
02 Feb 2016
1I want to print a float value which has 2 integer digits and 6 decimal digits after the comma. If I just use printf("%f", myFloat) I'm getting a truncated value.
2
3I don't know if this always happens in C, or it's just because I'm using C for microcontrollers (CCS to be exact), but at the reference it tells that %f get just that: a truncated float.
4
5If my float is 44.556677, I'm printing out "44.55", only the first two decimal digits.
similar questions
queries leading to this page
float