I've a problem ( and i'm a 2 weeks working with java en still learning), the user must give a number p en q, then it must divide p / q ,
if it is a whole number then it may not show the .
for example 10 / 2 this would be 5
but if it is 33/12 then it would me 2.75
No problem with that but extra is that if it is a number like
1/3 = 0,333333333 .. it keeps going, then it must round to 40 numbers after the comma and show … ( three dots, so that they now it is endless. )
I don't know in Java how to make the 1/3 part… I sit stuck at this.
Someone know how to solve this?
Thanks in advantage.