THE STOCK INVENTORY MANAGEMENT PROGRAM

Our program gives the overview of how inventory management system works.Firstly it tells how much is the bill of the individual customer and then it tells at the and when we press '0' meaning shop is closed to tell total sale of the day and how much particular item is left and what were the total sales of individual items etc.

THE STOCK INVENTORY MANAGEMENT PROGRAM


#include <iostream>
using namespace std;
int endday=1;

int pencil=100;
int p=10;

int sharpener=50;;
int s=10;
int eraser=200;;
int e=2;
int ruler=17;
int r=5;
int glue=10;
int g=25;
int book=123;
int b=200;
int copies=400;
int c=50;
int n;
int choice;
char End;
char reply;
int tsum=0;
int isum=0;

int main(){
cout<<"STATIONARY INVENTORY MANAGEMENT SYSTEM"<<endl;
while(endday!=0){                                                              //this ensures that program run indefinitely.
do{
        int sum=0;                                                        //ensures individual sum returns 0 after he has left.
{do{                                                       //choices given in do loop so that they are visible in each loop.
cout<<"What item do you want"<<endl;
cout<<"Enter 1 to have pencil"<<endl;
cout<<"Enter 2 to have sharpener"<<endl;
cout<<"Enter 3 to have eraser"<<endl;
cout<<"Enter 4 to have ruler"<<endl;
cout<<"Enter 5 to have glue"<<endl;
cout<<"Enter 6 to have book"<<endl;
cout<<"Enter 7 to have copies"<<endl;

cin>>choice;
cout<<"What quantity do you want"<<endl;
cin>>n;
    for(int x=0;x<n;x++){                                //helps in making  sum of individual quantity's cost.
        switch (choice){
        case 1:

        sum=sum+p*1;
        pencil--;
        break;
        case 2:
        sum+=s*1;
        sharpener--;
        break;
        case 3:
       sum+=e*1;
        eraser--;
        break;
        case 4:
        sum+=r*1;
        ruler--;
        break;
        case 5:
        sum+=g*1;
        glue--;
        break;
        case 6:
        sum+=b*1;
        book--;
        break;
       case 7:
        sum+=c*1;
        copies--;
        break;
        }
        }

        cout<<"do you want some thing else,press Y to buy any other thing"<<endl;
        cin>>reply;
        }while(reply=='Y');
        cout<<"the sum of this customer is=--"<<sum<<endl;
        isum=sum;
        }

        cout<<"Enter E to end"<<endl;
        cin>>End;
          }while(End!='E');
cout<<" enter 0 to close shop transaction"<<endl;
     cin>>endday   ;
     }
     cout<<"Total pencils left= "<<pencil<<endl<<endl;
       cout<<"Total sharpeners left= "<<sharpener<<endl<<endl;
         cout<<"Total eraser left= "<<eraser<<endl<<endl;
           cout<<"Total glue left= "<<glue<<endl<<endl;
             cout<<"Total book left= "<<book<<endl<<endl;
               cout<<"Total copies left= "<<copies<<endl<<endl;

               tsum+=isum;

cout<<"total sale of today in cash=--"<<tsum<<endl<<endl;
cout<<"items sold="<<endl;
cout<<"            "<<"pencils:"<<100-pencil<<endl;
cout<<"            "<<"sharpener:"<<50-sharpener<<endl;
cout<<"            "<<"erasers:"<<200-eraser<<endl;
cout<<"            "<<"glues:"<<10-glue<<endl;
cout<<"            "<<"rulers:"<<17-ruler<<endl;
cout<<"            "<<"books:"<<123-book<<endl;
cout<<"            "<<"copies:"<<400-copies<<endl;
}



FEEL FREE TO EDIT AND IMPROVE IT.
First

Comments:

Disqus Shortname