Create a Simple Stock Management Program in C++ Programming Language
#include<conio.h>
#include<iostream.h>
class inventory
{
int code,qty;
char name[20];
float rate,total,gtotal;
public:
void getdata()
{
cout<<"\n Enter item code ";
cin>>code;
cout<<"\n Enter name ";
cin>>name;
cout<<"\n Enter qty ";
cin>>qty;
cout<<"\n Enter rate ";
cin>>rate;
}
void cal()
{
total=rate*qty;
gtotal=total+gtotal;
}
void putdata()
{
cout<<"\n Icode "<<code;
cout<<"\n Name "<<name;
cout<<"\n qty "<<qty;
cout<<"\n Rate "<<rate;
cout<<"\n Total "<<total;
cout<<"\n Grand total "<<gtotal;
}
};
void main()
{
inventory i;
clrscr();
i.getdata();
i.cal();
i.putdata();
getch();
}
#include<iostream.h>
class inventory
{
int code,qty;
char name[20];
float rate,total,gtotal;
public:
void getdata()
{
cout<<"\n Enter item code ";
cin>>code;
cout<<"\n Enter name ";
cin>>name;
cout<<"\n Enter qty ";
cin>>qty;
cout<<"\n Enter rate ";
cin>>rate;
}
void cal()
{
total=rate*qty;
gtotal=total+gtotal;
}
void putdata()
{
cout<<"\n Icode "<<code;
cout<<"\n Name "<<name;
cout<<"\n qty "<<qty;
cout<<"\n Rate "<<rate;
cout<<"\n Total "<<total;
cout<<"\n Grand total "<<gtotal;
}
};
void main()
{
inventory i;
clrscr();
i.getdata();
i.cal();
i.putdata();
getch();
}
Create a Simple Stock Management Program in C++ Programming Language
Reviewed by Unknown
on
6:09:00 PM
Rating:
No comments: