computer hardware management system
#include<stdio.h>
#include<conio.h>
long a,m,b,c,stock=0;
void display()
{
clrscr();
printf("=======================<<Parts>>=========================");
printf("\n========================================================");
printf("\n! Code ! Items ! Price !");
printf("\n========================================================");
printf("\n! Code 1: ! Price of Mouse ");
printf("\n! Code 2: ! Price of Keyboard ");
printf("\n! Code 3: ! Price of Moniter ");
printf("\n! Code 4: ! Price of Speakers ");
printf("\n! Code 5: ! Price of U.P.S. ");
printf("\n! Code 6: ! Price of Mother Board ");
printf("\n! Code 7: ! Price of Printer ");
printf("\n!=====================================================!");
printf("\n! Code 8: Make the Bill. !");
printf("\n! Code 9: select the New item. !");
printf("\n=========================================================");
};
void entry()
{
play:
printf("\n\nEnter the Product Code:");
scanf("%d",&a);
};
void product1()
{
c=200;
printf("\n<<Mouse Rs 200>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=c*b;
stock=stock+c;
};
void product2()
{
printf("\n<<Keyboard Rs300>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=300;
c=c*b;
stock=stock+c;
};
void product3()
{
printf("\n<<Moniter Rs5000>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=5000;
c=c*b;
stock=stock+c;
};
void product4()
{
printf("\n<<speaker Rs450>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=500;
c=c*b;
stock=stock+c;
};
void product5()
{
printf("\n<<U.P.S. Rs3000>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=3000;
c=c*b;
stock=stock+c;
};
void product6()
{
printf("\n<<Mother board Rs3000>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=3000;
c=c*b;
stock=stock+c;
};
void product7()
{
printf("\n<<Printer Rs5000>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=5000;
c=c*b;
stock=stock+c;
};
void product8()
{
printf("\nNet Bill is:%u",stock);
};
void product9()
{
printf("\nNew program.");
printf("\nNet Bill is:%u",stock);
};
void fdisplay()
{
printf("\n====================================================");
printf("\nItems Rate Qty Cost");
printf("\n====================================================");
if(a==1)
{
printf("\nMouse");
}
if(a==2)
{
printf("\nKeyboard");
}
if(a==3)
{
printf("\nMoniter");
}
if(a==4)
{
printf("\nSpeakers");
}
if(a==5)
{
printf("\nU.P.S.");
}
if(a==6)
{
printf("\nMother Board");
}
if(a==7)
{
printf("\nPrinter");
}
printf("\n====================================================");
printf("\nNet Bill is: %d",stock);
printf("\n====================================================");
};
main()
{
clrscr();
play:
display();
entry();
if(a==1)
{
product1();
entry();
}
if(a==2)
{
product2();
entry();
}
if(a==3)
{
product3();
entry();}
if(a==4)
{
product4();
entry();
}
if(a==5)
{
product5();
entry();
}
if(a==6)
{
product6();
entry();
}
if(a==7)
{
product7();
entry();
}
if(a==8)
{
product8();
fdisplay();
entry();
}
if(a==9)
{
product9();
goto play;
}
getch();
}
#include<stdio.h>
#include<conio.h>
long a,m,b,c,stock=0;
void display()
{
clrscr();
printf("=======================<<Parts>>=========================");
printf("\n========================================================");
printf("\n! Code ! Items ! Price !");
printf("\n========================================================");
printf("\n! Code 1: ! Price of Mouse ");
printf("\n! Code 2: ! Price of Keyboard ");
printf("\n! Code 3: ! Price of Moniter ");
printf("\n! Code 4: ! Price of Speakers ");
printf("\n! Code 5: ! Price of U.P.S. ");
printf("\n! Code 6: ! Price of Mother Board ");
printf("\n! Code 7: ! Price of Printer ");
printf("\n!=====================================================!");
printf("\n! Code 8: Make the Bill. !");
printf("\n! Code 9: select the New item. !");
printf("\n=========================================================");
};
void entry()
{
play:
printf("\n\nEnter the Product Code:");
scanf("%d",&a);
};
void product1()
{
c=200;
printf("\n<<Mouse Rs 200>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=c*b;
stock=stock+c;
};
void product2()
{
printf("\n<<Keyboard Rs300>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=300;
c=c*b;
stock=stock+c;
};
void product3()
{
printf("\n<<Moniter Rs5000>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=5000;
c=c*b;
stock=stock+c;
};
void product4()
{
printf("\n<<speaker Rs450>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=500;
c=c*b;
stock=stock+c;
};
void product5()
{
printf("\n<<U.P.S. Rs3000>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=3000;
c=c*b;
stock=stock+c;
};
void product6()
{
printf("\n<<Mother board Rs3000>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=3000;
c=c*b;
stock=stock+c;
};
void product7()
{
printf("\n<<Printer Rs5000>>");
printf("\nEnter the quantity:");
scanf("%d",&b);
c=5000;
c=c*b;
stock=stock+c;
};
void product8()
{
printf("\nNet Bill is:%u",stock);
};
void product9()
{
printf("\nNew program.");
printf("\nNet Bill is:%u",stock);
};
void fdisplay()
{
printf("\n====================================================");
printf("\nItems Rate Qty Cost");
printf("\n====================================================");
if(a==1)
{
printf("\nMouse");
}
if(a==2)
{
printf("\nKeyboard");
}
if(a==3)
{
printf("\nMoniter");
}
if(a==4)
{
printf("\nSpeakers");
}
if(a==5)
{
printf("\nU.P.S.");
}
if(a==6)
{
printf("\nMother Board");
}
if(a==7)
{
printf("\nPrinter");
}
printf("\n====================================================");
printf("\nNet Bill is: %d",stock);
printf("\n====================================================");
};
main()
{
clrscr();
play:
display();
entry();
if(a==1)
{
product1();
entry();
}
if(a==2)
{
product2();
entry();
}
if(a==3)
{
product3();
entry();}
if(a==4)
{
product4();
entry();
}
if(a==5)
{
product5();
entry();
}
if(a==6)
{
product6();
entry();
}
if(a==7)
{
product7();
entry();
}
if(a==8)
{
product8();
fdisplay();
entry();
}
if(a==9)
{
product9();
goto play;
}
getch();
}
0 comments :
Post a Comment