Can you please help me with this what's wrong here:
import java.util.*;
class Cuboid
{
Scanner sc=new Scanner(System.in);
int l;
int b;
int h;
int area=0;
int vol=0;
public static void main()
{
Cuboid obj=new Cuboid();
obj.accept();
obj.cal();
obj.display();
}
void accept()
{
System.out.println("Please Enter the Lenght of the cuboid");
int l=sc.nextInt();
System.out.println("Please Enter the Breadth of the cuboid");
int b=sc.nextInt();
System.out.println("Please Enter the Height of the cuboid");
int h=sc.nextInt();
}
void cal()
{
int area=2*((l*b)+(b*h)+(l*h));
int vol=l*b*h;
}
void display()
{
System.out.println(area);
System.out.println(vol);
}
}
Answers
Answered by
0
Answer:
जवजबूव्हादिब्सब u
Explanation:
jjshdhoakdjo
Attachments:
Similar questions