Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

ASSIGNMENT

PROGRAMMING
FUNDAMENTALS
Submitted By:
Sidra Bashir
BT 15012
Submitted To:
Sir Irfan Ahmed
// INVENTORY MANEGMENT SOFTWARE

#include<iostream.h>

#include<conio.h>

#include<stdlib.h>

void main()

clrscr();

int m[100],b[100],o[100],ca,total[100],choice,n,i,id,dis,amount,discount;

char ch,c,s,se;

cout<<endl<<endl;

cout<<endl;

cout<<" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "<<endl;

cout<<" ***************************************************************** "<<endl;

cout<<" * UNIVERSITY OF THE PUNJAB GUJRANWALA CAMPUS * "<<endl;

cout<<" * INVENTORY MANEGMENT SOFTWARE * "<<endl;

cout<<" * DESINGED BY SIDRA BASHIR * "<<endl;

cout<<" ***************************************************************** "<<endl;

cout<<" ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ "<<endl;

cout<<endl;

start :

cout<<" Press 1 for on : "<<endl;

cout<<" Press 2 for off : "<<endl;

cout<<" Entere choice : "<<endl;


cin>> choice;

getch();

clrscr();

cout<<endl<<endl;

switch(choice)

case 2:

exit(0);

break;

case 1:

cout<<" Press E for execution : "<<endl;

cout<<" Press Q to quite the program : "<<endl;

cout<<" Enter your choice : "<<endl;

cin>>ch;

getch();

clrscr();

cout<<endl<<endl;

switch(ch)

case 'q':

case 'Q':
exit(0);

break;

case 'e':

case 'E':

b:

cout<<" How many person required : ";

cin>>n;

getch();

clrscr();

cout<<endl<<endl;

cout<<" *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* "<<endl;

cout<<" * INVENTRY LIST * "<<endl;

cout<<" *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* "<<endl;

cout<<endl;

for(i=1; i<=n; i++)

cout<<" CUSTOMER NO : "<<i<<" "<<endl;

cout<<" ******************************************* "<<endl;

cout<<endl;

cout<<" Enter amount of mangoes to purchase : ";

cin>>m[i];

cout<<" Enter amount of oranges to purchase : ";

cin>>o[i];
cout<<" Enter amount of bananas to purchase : ";

cin>>b[i];

cout<<endl<<endl;

cout<<" Data entered has been completed.. "<<endl;

for(i=1; i<=n; i++)

total[i] = b[i]*5 + o[i]*10 + m[i]*20;

getch();

clrscr();

cout<<endl<<endl;

cout<<" Press W for whole record : "<<endl;

cout<<" Press B for back menu : "<<endl;

cout<<" Press E for exit : "<<endl;

cout<<" Select an option :: "<<endl;

cin>>c;

getch();

clrscr();

cout<<endl;

switch(c)

{
case 'e':

case 'E':

exit(0);

break;

case 'b':

case 'B':

goto b;

case 'w':

case 'W':

cout<<" **-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**- "<<endl;

cout<<" Customer ID Mangoes Bananas Oranges Total Bill "<<endl;

cout<<" **-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**-**- "<<endl;

for(i=1; i<=n; i++)

cout<<" "<<i<<" "<<m[i]<<" "<<b[i]<<" "<<o[i]<<" Rs."<<total[i]<<"


"<<endl;

getch();

clrscr();

cout<<endl<<endl;
cout<<" Press V for voucher : "<<endl;

cout<<" Press E for exit : "<<endl;

cin>>s;

getch();

clrscr();

cout<<endl<<endl;

switch(s)

case 'e':

case 'E':

exit(0);

break;

case 'v':

case 'V':

cout<<" Enter customer ID ";

cin>>id;

cout<<" How much disscount you want to give ";

cin>>dis;

for(i=1; i<=n; i++)

if(i==id)

total[i] = b[i]*5 + o[i]*10 + m[i]*20;

discount = total[i]*dis/100;
amount = total[i]-discount;

clrscr();

cout<<endl<<endl;

cout<<" *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* "<<endl;

cout<<" S.B.Market "<<endl;

cout<<" Shop No 12 "<<endl;

cout<<" Customer ID :"<<i<<" "<<endl;

cout<<" *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* "<<endl;

cout<<endl;

cout<<" ====================================================================
"<<endl;

cout<<" Items Quantity Rate Price Total Bill "<<endl;

cout<<" ====================================================================
"<<endl;

cout<<endl;

cout<<" Mangoes "<<m[i]<<" 20 "<<m[i]*20<<" "<<endl;

cout<<" Oranges "<<o[i]<<" 10 "<<o[i]*10<<" "<<endl;

cout<<" Bananas "<<b[i]<<" 5 "<<b[i]*5<<" "<<endl;

cout<<" Amount Rs."<<total[i]<<" "<<endl;

cout<<" Discount Rs."<<dis<<"% "<<endl;

cout<<" Amount to be paid Rs."<<amount<<" "<<endl;

cout<<endl;

cout<<" THANKS FOR SHOPING HERE!!!!... "<<endl;


cout<<endl;

cout<<" ====================================================================
"<<endl;

getch();

clrscr();

cout<<endl<<endl;

cout<<" Press S for search any record : "<<endl;

cout<<" Press R to restart the program : "<<endl;

cout<<" Press T to terminate the program : "<<endl;

cout<<" Enter your choice : "<<endl;

cin>>se;

getch();

clrscr();

cout<<endl<<endl;

switch(se)

case 's':

case 'S':

cout<<" Enter customer ID between 1 and "<<n<<" "<<endl;

cin>>ca;

getch();

clrscr();

cout<<endl<<endl;

for(i=1; i<=n; i++)


{

if(i==ca)

cout<<" *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* "<<endl;

cout<<" Customer ID Mangoes Bananas Oranges Total Bill "<<endl;

cout<<" *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-* "<<endl;

cout<<" "<<i<<" "<<m[i]<<" "<<b[i]<<" "<<o[i]<<" Rs."<<total[i]<<"


"<<endl;

case 'r':

case 'R':

goto start;

case 't':

case 'T':

exit(0);

break;

getch();

clrscr();

} }

getch();

}
*************************************************************************************

*************************************************************************************

You might also like