Create a Store Management System in C++ Language
#include<conio.h>
#include<iostream.h>
class driver
{
double i_code[10],i_price[10],n;
char i_name[15][10];
public:
void getdata();
void friend discount(driver);
};
void driver::getdata()
{
int i;
cout<<"How Many Item Do You Want Enter";cin>>n;
for(i=0;i<n;i++)
{cout<<"enter items:-"<<endl;
cout<<"\n\tEnter Item Code :-\t";cin>>i_code[i];
cout<<"\n\tEnter Item Name :-\t";cin>>i_name[i];
cout<<"\n\tEnter Item Price :-\t";cin>>i_price[i];
}
}
void discount(driver m)
{
int tp=0,dis,i;
clrscr();
for(i=0;i<m.n;i++)
{
cout<<"\n\n\n\tItem Code :-\t"<<m.i_code[i];
cout<<"\n\tItem Name :-\t"<<m.i_name[i];
cout<<"\n\tItem Price :-\t"<<m.i_price[i];
dis=(m.i_price[i]*15)/100;
cout<<"\n\tDiscount :-\t"<<dis;
cout<<"\n\tTotal Price:-\t"<<m.i_price[i]-dis;
tp=tp+m.i_price[i]-dis;
}
cout<<"\n\n\t Total Bill Amount Is \t"<<tp;
cout<<"\n\n\t This Bill Is Computer Generated";
}
void main()
{
textcolor(111);
clrscr();
driver p;
p.getdata();
discount(p);
getch();
}
#include<iostream.h>
class driver
{
double i_code[10],i_price[10],n;
char i_name[15][10];
public:
void getdata();
void friend discount(driver);
};
void driver::getdata()
{
int i;
cout<<"How Many Item Do You Want Enter";cin>>n;
for(i=0;i<n;i++)
{cout<<"enter items:-"<<endl;
cout<<"\n\tEnter Item Code :-\t";cin>>i_code[i];
cout<<"\n\tEnter Item Name :-\t";cin>>i_name[i];
cout<<"\n\tEnter Item Price :-\t";cin>>i_price[i];
}
}
void discount(driver m)
{
int tp=0,dis,i;
clrscr();
for(i=0;i<m.n;i++)
{
cout<<"\n\n\n\tItem Code :-\t"<<m.i_code[i];
cout<<"\n\tItem Name :-\t"<<m.i_name[i];
cout<<"\n\tItem Price :-\t"<<m.i_price[i];
dis=(m.i_price[i]*15)/100;
cout<<"\n\tDiscount :-\t"<<dis;
cout<<"\n\tTotal Price:-\t"<<m.i_price[i]-dis;
tp=tp+m.i_price[i]-dis;
}
cout<<"\n\n\t Total Bill Amount Is \t"<<tp;
cout<<"\n\n\t This Bill Is Computer Generated";
}
void main()
{
textcolor(111);
clrscr();
driver p;
p.getdata();
discount(p);
getch();
}
Create a Store Management System in C++ Language
Reviewed by Unknown
on
6:15:00 PM
Rating:
No comments: