Computer Science, asked by AryanDeb, 2 months ago

Write the output
class Num

{

int x; float y;

public :

void init(void)

{

X=y=10;

}

void read(int i, float j)

{

x=i;

y= j;

}

void display()

{

cout<<” x => ” << x <<”\n”;

cout<<” y => ” << y <<”\n”;

}

};

void main()

{

Num obj1, obj2;

obj1.init();

obj2.init();

obj1.read(15 , 11.21);

obj1.display();

obj2.display();

}​

Answers

Answered by Anonymous
0

Explanation:

logic is of this program is unclear to me.

I tried to compile it...sharing the output.

it's throwing error(s)

Attachments:
Similar questions