I am trying to make a division and with the answer I want to separate the decimal and round it to two decimal points.
After this, I want to assign the decimal part to another function.
Thank You
Mexkn 0 Newbie Poster
Recommended Answers
Jump to PostThese threads might be useful.
http://www.daniweb.com/forums/thread184830.html
http://www.cplusplus.com/reference/clibrary/cmath/floor/
http://www.cplusplus.com/reference/clibrary/cmath/pow/To round down to the lower tenth, multiply the decimal part by 10, take the floor, then divide by 10.
5.6789 // original number.
.6789 // decimal part.
6.789 // decimal part times 10
…
All 4 Replies
Topi Ojala 2 Junior Poster in Training
VernonDozier 2,218 Posting Expert Featured Poster
ArkM 1,090 Postaholic
mariorenato 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.