0

What to do (C++) to get a fractional value?

For example: int not_Fraction = 23/5; cout << not_Fraction; return 0; This prints only the whole number and avoids any remainder. But what do i need to do get the value in fraction?

3rd Oct 2019, 4:09 PM
Samiul Nasif Tayem
Samiul Nasif Tayem - avatar
1 Answer
+ 1
use float or double instead of int
3rd Oct 2019, 4:12 PM
Taste
Taste - avatar