click here

#include  < iostream.h >
#include < conio.h >
class item
{
private:
int number;
float cost;
public:
void getdata(int a,float b);
void putdata(void);
};
void main()
{
clrscr();
item x,y,z;
x.getdata(100,25.5);
x.putdata();
getch();
}
void item::getdata(int a,float b)
{
number=a;
cost=b;
}
void item::putdata(void)
{
cout << "number=" << number;
cou << "\n cost=" << cost;
}
<< GO BACK

Our aim is to provide information to the knowledge seekers.


comments powered by Disqus
click here


NaturalNaturalNaturalNatural Footer1