Computer Science, asked by ashamishra170pci228, 1 year ago

how to type two decimal places in java? ex- INPUT - 12.367 OUTPUT - 12.37 WITHOUT USING MATH CLASS

Answers

Answered by AKASHDIPDAS
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);
}
}

ashamishra170pci228: bhai round off value chaahiye
VickyskYy: hlo ?
Similar questions