float i = 55 ;
float y = 23 ;
float u = i / y ;
System.out.println(u);
i want to print u Round to five decimal places how i can do this approximation ?
float i = 55 ;
float y = 23 ;
float u = i / y ;
System.out.println(u);
i want to print u Round to five decimal places how i can do this approximation ?
Look for a concept called NumberFormat in Java. It will solve your issue.
Look up Math.round.
You'll have to do a calculation before AND after...
but I have to leave SOME work for you to do.
Look for a concept called NumberFormat in Java. It will solve your issue.
thank u NumberFormat work :)
Look up Math.round.
You'll have to do a calculation before AND after...
but I have to leave SOME work for you to do.
math.round is work but not give me the required solution that better to use NumberFormat but thank for try to help me :)