0
Why this program showing error?plzzz solve my error
class box { double l,b,h,v; void input(double x,double y,double z) { l= x; b= y; h= z; } void vol() { v= (l*b*h); } } class cylinder { double r,h,v; void input(double x,double y) { r= x; h= y; } void vol { v= 3.14*r*r*h; } } class computevol { static void addvol(box v1,cylinder v2) { computevol ob= new computevol(); ob.v= v1.v+v2.v; System.out.println(ob.vol); } public static void main(String args[]) { box b1= new box(); b1.input(4.0,2.0,1.0); b1.vol(); cylinder b2= new cylinder(); b2.input(3.0,7.0); b2.vol
5 odpowiedzi
+ 2
Sandeep Awasthi
https://code.sololearn.com/c6g1Lq7H3FrJ/?ref=app
i correct your error
this mighy help you
+ 1
most of them are syntax errors
make sure that you close all open braces
and some missing semicolon and invalid function calls
+ 1
Sreejith now u can check my code
https://code.sololearn.com/cBB18MxgRfDU/?ref=app
+ 1
Sandeep Awasthi
line no. 32: remove it and add this
double vol;
line no. 34: remove ob from println function
0
no of palindrome in the sentence