Is there a vulgar fraction that can be used as a variable?
For example: I want to separate the integers 1 and 3. The result as int is 0, because the result of double is 0,333333333 . However, I want the result to be exactly 1/3 , and then use it in other program equations.
Is there a variable like integer ( int ), decimal ( double ), etc (which is declared and used in the same way)? Or should I do it myself?
At first I thought about how to do it myself, but I failed.
Thanks!
source share