I need to write a function that takes 2 floats and returns the truncated integer average of the two floats.
What is a truncated integer?
Thanks
I need to write a function that takes 2 floats and returns the truncated integer average of the two floats.
What is a truncated integer?
Thanks
>What is a truncated integer?
In other words, find the average and assign that value to an integer. But be very careful with the floating-point values you assign to an integer, the rules that C has for such conversions can often result in undefined behavior.Code:trun·cate Pronunciation Key (trngkt) tr.v. trun·cat·ed, trun·cat·ing, trun·cates 1. To shorten by or as if by cutting off. See Synonyms at shorten. 2. To shorten (a number) by dropping one or more digits after the decimal point.
-Prelude
My best code is written with the delete key.