public static void main(String[] args) {//begin main
Scanner worksheet = new Scanner(System.in);
{
double radi;
double area;
double circum;
double pie = 3.14;
System.out.println("Enter the radius: ");
radi = worksheet.nextDouble();//enter 1.2
area = pie * radi * radi;
Area comes out as 4.521599999999999, but I want it to be 4.52.
System.out.println("The area is:" + area);
circum=2*pie*radi;
circum
comes out as 7.536.
want it to be 7.53
System.out.println("The circumference is:"+circum);
}
How can I truncate the value to 2 decimal places without a method.