how to type two decimal places in java? ex- INPUT - 12.367 OUTPUT - 12.37 WITHOUT USING MATH CLASS
Answers
Answered by
2
public class J_A_V_A
{
public static void main()
{
double f = 12.37
double g = 22.44
double sum = (f+g);
System.out.println("The sum is ="+sum);
}
}
{
public static void main()
{
double f = 12.37
double g = 22.44
double sum = (f+g);
System.out.println("The sum is ="+sum);
}
}
ashamishra170pci228:
bhai round off value chaahiye
Similar questions