Hello,
I am currently trying to make a program that uses fractions, such as 1/4, and adds them and subtracts them( i know it sounds stupid, ut i have a special use for it). I dont know how to make fractions, and doubt you can, so i use their decimal equivalents. Anyway, whenever i try to use any type of variable, includng floating point variables, i always get 0 or 1, never .25 or . anything when i didve the two numbers ( like 4 and 1). LIkewise, when i do 10/3, i get 3.0, and never get a decimal. Is there a way to fix this and extend the number of zeros there are after the decimal, or should i learn another programming language for this?
Thanks
I am currently trying to make a program that uses fractions, such as 1/4, and adds them and subtracts them( i know it sounds stupid, ut i have a special use for it). I dont know how to make fractions, and doubt you can, so i use their decimal equivalents. Anyway, whenever i try to use any type of variable, includng floating point variables, i always get 0 or 1, never .25 or . anything when i didve the two numbers ( like 4 and 1). LIkewise, when i do 10/3, i get 3.0, and never get a decimal. Is there a way to fix this and extend the number of zeros there are after the decimal, or should i learn another programming language for this?
Thanks