Add to Favorites    Make Home Page 22403 Online  
 Language Categories  
 Our Services  

Home » C++ Home » Beginners / Lab Assignments Home » program for a distributor

A D V E R T I S E M E N T

Search Projects & Source Codes:

Title program for a distributor
Author pratik gohil
Author Email pratikgohil1985 [at] yahoo.com
Description This is a small program
which can be used by distributor
to maintain the stock & account.
Category C++ » Beginners / Lab Assignments
Hits 17962
Code Select and Copy the Code
#include <iostream.h> #include <graphics.h> #include <dos.h> #include <conio.h> #include <stdlib.h> #include <stdio.h> class SHOP { private : int z,P1,P2,P3,P4,P5,P6,P7,P8,totalP; int S1,S2,S3,S4,S5,S6,S7,S8,S9,totalS; int D1,D2,D3,D4,D5,D6,D7,D8,totalD; int s1,s2,s3,s4,s5,s6,s7,s8,totals; int p1,p2,p3,p4,p5,p6,p7,p8,totalp; public : void FRONT() { totals=totalp=totalP=totalS=0; P1=P2=P3=P4=P5=P6=P7=P8=0; S1=S2=S3=S4=S5=S6=S7=S8=0; p1=p2=p3=p4=p5=p6=p7=p8=0; s1=s2=s3=s4=s5=s6=s7=s8=0; z=0; //MAIN SCREEN******************************************************************** switching: { int gdriver = DETECT, gmode; initgraph(&gdriver, &gmode, "C:\TC\BGI"); cleardevice(); setcolor(getmaxcolor()); textcolor(getmaxcolor()); settextjustify(CENTER_TEXT, CENTER_TEXT); settextstyle(10,0,4); outtextxy(320,25,"ZINNIA DISTRIBUTOR"); setcolor(13); rectangle(0,0,639,70); rectangle(2,2,637,68); rectangle(4,4,635,66); rectangle(220,140,420,340); rectangle(223,143,417,337); gotoxy(33,12); cout<<"1) PURCHASE"; gotoxy(33,14); cout<<"2) SALES"; gotoxy(33,16); cout<<"3) REPORT"; gotoxy(33,18); cout<<"4) EXIT"; gotoxy(32,28); cout<<"YOUR CHOICE IS : "; rectangle(200,420,440,460); rectangle(202,422,438,458); setfillstyle(10,13); floodfill(1,75,13); cin>>z; cleardevice(); switch(z) { case 1: //PURCHASE*************************************************************** { cout<<" _________________________________________________________________ _______________"; cout<<" SNO ITEM RATE QTY AMOUNT "; cout<<" _________________________________________________________________ _______________"; cout<<" 1] WHOLE 55 "; cout<<" 2] PRE-CUT 60 "; cout<<" 3] ASSORTED 35 "; cout<<" 4] SOUP 10 "; cout<<" 5] WINGS 55 "; cout<<" 6] GIZZARD 45 "; cout<<" 7] TWO LEGS 90 "; cout<<" 8] FOUR DRUMS 30 "; cout<<" _______________________________________________________________ _________________"; cout<<" TOTAL -----> Rs."; cout<<" _______________________________________________________________ _________________"; rectangle(0,0,639,479); rectangle(530,400,635,440); settextstyle(10,0,4); outtextxy(210,410,"PURCHASE"); gotoxy(62,8); cin>>P1; p1=p1+P1; gotoxy(62,10); cin>>P2; p2=p2+P2; gotoxy(62,12); cin>>P3; p3=p3+P3; gotoxy(62,14); cin>>P4; p4=p4+P4; gotoxy(62,16); cin>>P5; p5=p5+P5; gotoxy(62,18); cin>>P6; p6=p6+P6; gotoxy(62,20); cin>>P7; p7=p7+P7; gotoxy(62,22); cin>>P8; p8=p8+P8; gotoxy(75,8); D1=P1*55; cout<<D1; gotoxy(75,10); D2=P2*60; cout<<D2; gotoxy(75,12); D3=P3*35; cout<<D3; gotoxy(75,14); D4=P4*10; cout<<D4; gotoxy(75,16); D5=P5*55; cout<<D5; gotoxy(75,18); D6=P6*45; cout<<D6; gotoxy(75,20); D7=P7*90; cout<<D7; gotoxy(75,22); D8=P8*30; cout<<D8; gotoxy(75,27); totalP=D1+D2+D3+D4+D5+D6+D7+D8; totalp=totalp+totalP; cout<<totalP; getch(); goto switching; } case 2: //SALES******************************************************************* ** { cout<<" _________________________________________________________________ _______________"; cout<<" SNO ITEM RATE QTY AMOUNT "; cout<<" _________________________________________________________________ _______________"; cout<<" 1] WHOLE 60 "; cout<<" 2] PRE-CUT 65 "; cout<<" 3] ASSORTED 40 "; cout<<" 4] SOUP 15 "; cout<<" 5] WINGS 60 "; cout<<" 6] GIZZARD 50 "; cout<<" 7] TWO LEGS 95 "; cout<<" 8] FOUR DRUMS 35 "; cout<<" _______________________________________________________________ _________________"; cout<<" TOTAL -----> Rs."; cout<<" _______________________________________________________________ _________________"; rectangle(0,0,639,479); rectangle(530,400,635,440); settextstyle(10,0,4); outtextxy(210,410,"SALES"); gotoxy(62,8); cin>>S1; s1=s1+S1; gotoxy(62,10); cin>>S2; s2=s2+S2; gotoxy(62,12); cin>>S3; s3=s3+S3; gotoxy(62,14); cin>>S4; s4=s4+S4; gotoxy(62,16); cin>>S5; s5=s5+S5; gotoxy(62,18); cin>>S6; s6=s6+S6; gotoxy(62,20); cin>>S7; s7=s7+S7; gotoxy(62,22); cin>>S8; s8=s8+S8; gotoxy(75,8); D1=S1*60; cout<<D1; gotoxy(75,10); D2=S2*65; cout<<D2; gotoxy(75,12); D3=S3*40; cout<<D3; gotoxy(75,14); D4=S4*15; cout<<D4; gotoxy(75,16); D5=S5*60; cout<<D5; gotoxy(75,18); D6=S6*50; cout<<D6; gotoxy(75,20); D7=S7*95; cout<<D7; gotoxy(75,22); D8=S8*35; cout<<D8; gotoxy(75,27); totalS=D1+D2+D3+D4+D5+D6+D7+D8; totals=totals+totalS; cout<<totalS; getch(); cleardevice(); goto switching; } case 3: //REPORT****************************************************************** * { cout<<"___________________________________________________________________ _____________"; cout<<" SNO ITEM PURCHASE SALES STOCK LEFT"; cout<<" _________________________________________________________________ _______________"; cout<<" 1] WHOLE "<<p1<<" "<<s1<<" "<<p1-s1; cout<<" 2] PRE-CUT "<<p2<<" "<<s2<<" "<<p2-s2; cout<<" 3] ASSORTED "<<p3<<" "<<s3<<" "<<p3-s3; cout<<" 4] SOUP "<<p4<<" "<<s4<<" "<<p4-s4; cout<<" 5] WINGS "<<p5<<" "<<s5<<" "<<p5-s5; cout<<" 6] GIZZARD "<<p6<<" "<<s6<<" "<<p6-s6; cout<<" 7] TWO LEGS "<<p7<<" "<<s7<<" "<<p7-s7; cout<<" 8] FOUR DRUMS "<<p8<<" "<<s8<<" "<<p8-s8; cout<<" _________________________________________________________________ _______________"; cout<<" PURCHASE : Rs."<<totalp; cout<<" SALES : Rs."<<totals; cout<<" PROFIT : Rs."<<(s1+s2+s3+s4+s5+s6+s7+s8)*5; cout<<" BALANCE ON COUNTER : Rs. "; if((totals-totalp)<0) { cout<<-(totals-totalp)<<" CREDIT "; } else { cout<<(totals-totalp)<<" DEBIT "; } rectangle(0,0,639,479); rectangle(50,300,370,470); rectangle(55,425,365,455); rectangle(52,302,368,468); settextstyle(10,0,4); outtextxy(320,20,"REPORT"); getch(); cleardevice(); goto switching; } case 4: //EXIT THE PROGRAM****************************************************************** { exit(0); } default : //DEFAULT***************************************************************** * { goto switching; } } } } }; //MAIN PROGRAM****************************************************************** void main() { clrscr(); SHOP a; a.FRONT(); getch(); }

Related Source Codes

Script Name Author
Moving ball screen saver karlmarx
The Classic Game of Snake & Ladder Lakshmi Narayana .A
Railway seat reservation question which comes in sapient VyomWorld
To calculate percentile Ravi Mathur
Send to folder ANIMESH SAHU
Analog clock and calendar Nazia & Rida
HIGH/LOW GAME MOLLY ARORA
Data structure (stack Implimentation) Swapnil B Adsure
Memory Game AnirudhSanyal
Easy Calc Anirudh Sanyal
GK Quiz Anirudh Sanyal
Hangman Game Manish Jain
Snakeman Manish Jain
Full month Calendar Nigi
Cursor shapes nigi

A D V E R T I S E M E N T




Google Groups Subscribe to SourceCodesWorld - Techies Talk
Email:

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!


ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page

 Advertisements  

Google Search

Google

Source Codes World.com is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions
Copyright ©2003-2017 SourceCodesWorld.com, All Rights Reserved.
Page URL: http://www.sourcecodesworld.com/source/show.asp?ScriptID=1154


Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review