mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-24 10:01:38 +00:00
add missing semicolons in c.html.markdown
This commit is contained in:
parent
f4ab326784
commit
3d0687027a
@ -183,8 +183,8 @@ int main() {
|
|||||||
i1 / i2; // => 0 (0.5, but truncated towards 0)
|
i1 / i2; // => 0 (0.5, but truncated towards 0)
|
||||||
|
|
||||||
// You need to cast at least one integer to float to get a floating-point result
|
// You need to cast at least one integer to float to get a floating-point result
|
||||||
(float)i1 / i2 // => 0.5f
|
(float)i1 / i2; // => 0.5f
|
||||||
i1 / (double)i2 // => 0.5 // Same with double
|
i1 / (double)i2; // => 0.5 // Same with double
|
||||||
f1 / f2; // => 0.5, plus or minus epsilon
|
f1 / f2; // => 0.5, plus or minus epsilon
|
||||||
// Floating-point numbers and calculations are not exact
|
// Floating-point numbers and calculations are not exact
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user