|
Computer shop management system using c Language or computer shop system c language Download this game project from here. Or have this source code. Source code: #include<stdio.h> #include<conio.h> #include<iostream.h> #include<stdlib.h> void main() { int b,ar; clrscr(); int a; clrscr(); { large: clrscr(); printf("\t\t\t\t WELCOME"); printf("\n\n\n\n\n\n"); printf("\n********************************************************************************"); printf("\n\t\t\tComputer Whole Sale Agency"); printf("\n\n********************************************************************************"); printf("\n\n\n\n\t\t\t\tMENU"); printf("\n\n\t\t\tEnter 1 to WRITE in files."); printf("\n\t\t\tEnter 2 to READ data of files."); printf("\n\t\t\tEnter 3 to see LIST of item avaliable."); printf("\n\t\t\tEnter 4 to EXIT."); printf("\n\n\n\t\t\tEnter your choice:"); scanf("%d",&a); }
if(a==1) { clrscr(); int aa; printf("\n\n\n\n\n\n\n\n\n\n\n\n\n"); printf("\t\t\t\tSUB-MENU"); printf("\n\n\n\t\tEnter 1 to WRITE entries for printer."); printf("\n\t\tEnter 2 to WRITE entries for CRT monitor."); printf("\n\t\tEnter 3 to WRITE entries for pen-drive."); printf("\n\t\tEnter 4 to WRITE entries for TFT screen."); printf("\n\t\tEnter 5 to WRITE entries for Processor."); printf("\n\t\tEnter 6 to WRITE entries for RAM."); printf("\n\t\tEnter 7 to WRITE entries for Cabinate."); printf("\n\t\tEnter 8 to WRITE entries for Motherboard."); printf("\n\t\tEnter any other number go back."); printf("\n\n\n\t\tEnter your choice:"); scanf("%d",&aa); switch(aa) { case 1: { FILE *f; char another='y'; struct emp { char t[10],name[20],co[16]; int as; int bs; }; struct emp e; clrscr(); f=fopen("c:\\print.txt","a"); printf("\t\t\t\tPrinter \n\n"); while(another=='y') { printf("Enter shop name:"); scanf("%s",e.name); printf("Enter company:"); scanf("%s",e.co); printf("Enter no. of printer needed:"); scanf("%d",&e.as); printf("Enter type of printer:"); scanf("%s",e.t); printf("Enter total amount:"); scanf("%d",&e.bs); fprintf(f,"\n %s \n %s \n %d \n %s \n %d\n",e.name,e.co,e.as,e.t,e.bs); puts("Press 'Y' to continue"); another=getche(); } fclose(f); goto large; break; } case 2: { FILE *al; char another='y'; struct emp { char name[20],co[16]; int as,zx; int bs; }; struct emp e; clrscr(); al=fopen("c:\\print1.txt","a"); printf("\t\t\t\tCRT - Monitor \n\n"); while(another=='y') { printf("Enter shop name:"); scanf("%s",e.name); printf("Enter company:"); scanf("%s",e.co); printf("Enter no. of CRT Monitor needed:"); scanf("%d",&e.as); printf("Enter size in inches:"); scanf("%d",&e.zx); printf("Enter total amount:"); scanf("%d",&e.bs); fprintf(al,"\n%s \n %s \n %d \n %d \n %d",e.name,e.co,e.as,e.zx,e.bs); puts("Press 'Y' to continue"); another=getche(); } fclose(al); goto large; break; } case 3: { FILE *zzaa; char another='y'; struct emp { char name[20],co[15]; int as,zx; int bs; }; struct emp e; clrscr(); zzaa=fopen("c:\\print2.txt","a"); printf("\t\t\t\tPen - Drive \n\n"); while(another=='y') { printf("Enter shop name:"); scanf("%s",e.name); printf("Enter company:"); scanf("%s",e.co); printf("Enter no.Pen-Drive needed:"); scanf("%d",&e.as); printf("Enter size of Pen-Drive(in GB):"); scanf("%d",&e.zx); printf("Enter total amount:"); scanf("%d",&e.bs); fprintf(zzaa,"\n%s \n %s \n %d \n %d \n%d",e.name,e.co,e.as,e.zx,e.bs); puts("Press 'Y' to continue"); another=getche(); } fclose(zzaa); goto large; break; } case 4: { FILE *zaa; char another='y'; struct emp { char name[20],co[16]; int as,zx; int bs; }; struct emp e; clrscr(); zaa=fopen("c:\\print3.txt","a"); printf("\t\t\t\tTFT - Monitor \n\n"); while(another=='y') { printf("Enter shop name:"); scanf("%s",e.name); printf("Enter company:"); scanf("%s",e.co); printf("Enter no. of TFT Monitor needed:"); scanf("%d",&e.as); printf("Enter size in inches:"); scanf("%d",&e.zx); printf("Enter total amount:"); scanf("%d",&e.bs); fprintf(zaa,"\n %s \n %s \n %d \n %d \n %d",e.name,e.co,e.as,e.zx,e.bs); puts("Press 'Y' to continue"); another=getche(); } fclose(zaa); goto large; } break; case 5: { FILE *zlaa; char another='y'; struct emp { char zx[9],name[20],co[16]; int as; int bs; }; struct emp e; clrscr(); zlaa=fopen("c:\\print4.txt","a"); printf("\t\t\t\tProcessor \n\n"); while(another=='y') { printf("Enter shop name:"); scanf("%s",e.name); printf("Enter company:"); scanf("%s",e.co); printf("Enter no. of processor needed:"); scanf("%d",&e.as); printf("Enter name of processor:"); scanf("%s",e.zx); printf("Enter total amount:"); scanf("%d",&e.bs); fprintf(zlaa,"\n %s \n %s \n %d \n %s \n %d",e.name,e.co,e.as,e.zx,e.bs); puts("Press 'Y' to continue"); another=getche(); } fclose(zlaa); goto large; } break; case 6: { FILE *yogi; char another='y'; struct emp { char t[6],name[20],co[16]; int as,zx; int bs; }; struct emp e; clrscr(); yogi=fopen("c:\\print5.txt","a"); printf("\t\t\t\tRAM \n\n"); while(another=='y') { printf("Enter shop name:"); scanf("%s",e.name); printf("Enter company:"); scanf("%s",e.co); printf("Enter type of RAM:"); scanf("%s",e.t); printf("Enter no. RAM needed:"); scanf("%d",&e.as); printf("Enter size in MB:"); scanf("%d",&e.zx); printf("Enter total amount:"); scanf("%d",&e.bs); fprintf(yogi,"\n%s \n %s \n %s \n %d \n %d \n%d",e.name,e.co,e.t,e.as,e.zx,e.bs); puts("Press 'Y' to continue"); another=getche(); } fclose(yogi); goto large; } case 7: { FILE *varun; char another='y'; struct emp { char name[20],co[16]; int as; int bs; }; struct emp e; clrscr(); varun=fopen("c:\\print6.txt","a"); printf("\t\t\t\tCabinate \n\n"); while(another=='y') { printf("Enter shop name:"); scanf("%s",e.name); printf("Enter company:"); scanf("%s",e.co); printf("Enter no. of Cabinate needed:"); scanf("%d",&e.as); printf("Enter total amount:"); scanf("%d",&e.bs); fprintf(varun,"\n %s \n %s \n %d \n %d",e.name,e.co,e.as,e.bs); puts("\nPress 'Y' to continue"); another=getche(); } fclose(varun); goto large; } case 8: { { FILE *yogi1; char another='y'; struct emp { char zx[8],name[20],co[16]; int as; int bs; }; struct emp e; clrscr(); yogi1=fopen("c:\\print7.txt","a"); printf("\t\t\t\tCabinate \n\n"); while(another=='y') { printf("Enter shop name:"); scanf("%s",e.name); printf("Enter company:"); scanf("%s",e.co); printf("Enter no. of Motherboard needed:"); scanf("%d",&e.as); printf("Enter type of Motherboard:"); scanf("%s",&e.zx); printf("Enter total amount:"); scanf("%d",&e.bs); fprintf(yogi1,"\n %s \n %s \n %d \n %s \n %d",e.name,e.co,e.as,e.zx,e.bs); puts("\nPress 'Y' to continue"); another=getche(); } fclose(yogi1); goto large; } } default: goto large; break; } } else if(a==2) { int ar; clrscr(); printf("\n\n\n\n\n\n\n\n\n\n\n\n\n"); printf("\t\t\t\tSUB-MENU"); printf("\n\t\t\t ------------"); printf("\n\n\n\t\tEnter 1 to READ entries for printer."); printf("\n\t\tEnter 2 to READ entries for CRT monitor."); printf("\n\t\tEnter 3 to READ entries for pen-drive."); printf("\n\t\tEnter 4 to READ entries for TFT screen."); printf("\n\t\tEnter 5 to READ entries for Processor."); printf("\n\t\tEnter 6 to READ entries for RAM."); printf("\n\t\tEnter 7 to READ entries for Cabinate."); printf("\n\t\tEnter 8 to READ entries for Motherboard."); printf("\n\t\tEnter any other number go back."); printf("\n\n\n\t\tEnter your choice:"); cin>>ar; switch(ar) { case 1: FILE *f; struct emp { char t[10],name[20],co[16]; int as; int bs; }; struct emp e; clrscr(); f=fopen("c:\\print.txt","r"); if(f==NULL) { puts("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tNo data"); getch(); goto large; } printf("\t\t\t\tPRINTER \n\n"); printf("Shop-Name\tPrinter-company\tPrinter-Needed\tPrinter-Type\tTotal-Amount\n"); printf("-----------------------------------------------------------------------------"); while(fscanf(f,"%s%s%d%s%d",e.name,e.co,&e.as,e.t,&e.bs)!=EOF) printf("\n\n%s\t\t%s\t\t%d\t\t%s\t\t%d",e.name,e.co,e.as,e.t,e.bs); getch(); goto large; break; case 2: { FILE *f; struct emp { char name[20],co[16]; int as,zx; int bs; }; struct emp e; clrscr(); f=fopen("c:\\print1.txt","r"); if(f==NULL) { puts("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tNo data"); getch(); goto large; } printf("\t\t\t\tCRT-Monitor \n\n"); printf("Shop-Name\tMonitor-company\tMonitor-Needed\tMonitor-Size\tTotal-Amount\n"); printf("-----------------------------------------------------------------------------"); while(fscanf(f,"%s%s%d%d%d",e.name,e.co,&e.as,&e.zx,&e.bs)!=EOF) printf("\n\n%s\t\t%s\t\t%d\t\t%d\t\t%d",e.name,e.co,e.as,e.zx,e.bs); getch(); goto large; break; } case 3: { FILE *zzaa; struct emp { char name[20],co[16]; int as,zx; int bs; }; struct emp e; clrscr(); zzaa=fopen("c:\\print2.txt","r"); if(zzaa==NULL) { puts("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tNo data"); getch(); goto large; } printf("\t\t\t\tPen-Drive \n\n"); printf("Shop-Name\tP/D-company\tP/D-Needed\tP/DSize\t\tTotal-Amount\n"); printf("-----------------------------------------------------------------------------"); while(fscanf(zzaa,"%s%s%d%d%d",e.name,e.co,&e.as,&e.zx,&e.bs)!=EOF) printf("\n\n%s\t\t%s\t\t%d\t\t%d\t\t%d",e.name,e.co,e.as,e.zx,e.bs); getch(); goto large; break; } case 4: { FILE *zaa; struct emp { char name[20],co[16]; int as,zx; int bs; }; struct emp e; clrscr(); zaa=fopen("c:\\print3.txt","r"); if(zaa==NULL) { puts("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tNo data"); getch(); goto large; } printf("\t\t\t\tTFT-Monitor \n\n"); printf("Shop-Name\tTFT-company\tMonitor-Needed\tTFT-Size\tTotal-Amount\n"); printf("-----------------------------------------------------------------------------"); while(fscanf(zaa,"%s%s%d%d%d",e.name,e.co,&e.as,&e.zx,&e.bs)!=EOF) printf("\n\n%s\t\t%s\t\t%d\t\t%d\t\t%d",e.name,e.co,e.as,e.zx,e.bs); getch(); goto large; break; } case 5: { FILE *zlaa; struct emp { char zx[9],name[20],co[16]; int as; int bs; }; struct emp e; clrscr(); zlaa=fopen("c:\\print4.txt","r"); if(zlaa==NULL) { puts("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tNo data"); getch(); goto large; } printf("\t\t\t\tProcessor \n\n"); printf("Shop-Name Processor-company Processor-Needed Name Total-Amount\n"); printf("-----------------------------------------------------------------------------"); while(fscanf(zlaa,"%s%s%d%s%d",e.name,e.co,&e.as,e.zx,&e.bs)!=EOF) printf("\n\n%s\t\t %s\t\t %d\t\t %s\t %d",e.name,e.co,e.as,e.zx,e.bs); getch(); goto large; break; } case 6: { FILE *yogi; struct emp { char t[8],name[20],co[16]; int zx,as; int bs; }; struct emp e; clrscr(); yogi=fopen("c:\\print5.txt","r"); if(yogi==NULL) { puts("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tNo data"); getch(); goto large; } printf("\t\t\t\tRAM \n\n"); printf("Shop-Name RAM-company Type RAM-Needed RAM-Size(MB) Total-Amount\n"); printf("-----------------------------------------------------------------------------"); while(fscanf(yogi,"%s %s %s %d %d %d",e.name,e.co,e.t,&e.as,&e.zx,&e.bs)!=EOF) printf("\n\n%s\t\t%s \t%s \t%d \t%d\t\t%d",e.name,e.co,e.t,e.as,e.zx,e.bs); getch(); goto large; break; } case 7: { FILE *varun; struct emp { char name[20],co[16]; int as; int bs; }; struct emp e; clrscr(); varun=fopen("c:\\print6.txt","r"); if(varun==NULL) { puts("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tNo data"); getch(); goto large; } printf("\t\t\t\tCabinate \n\n"); printf("Shop-Name\tCabinate-company\tCabinate-Needed\t\tTotal-Amount\n"); printf("-----------------------------------------------------------------------------"); while(fscanf(varun,"%s %s %d %d",e.name,e.co,&e.as,&e.bs)!=EOF) printf("\n\n%s\t\t%s\t\t\t%d\t\t\t%d",e.name,e.co,e.as,e.bs); getch(); goto large; break; } case 8: { FILE *yogi1; struct emp { char zx[8],name[20],co[16]; int as; int bs; }; struct emp e; clrscr(); yogi1=fopen("c:\\print7.txt","r"); if(yogi1==NULL) { puts("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\tNo data"); getch(); goto large; } printf("\t\t\t\tMotherboard\n\n"); printf("Shop-Name Motherboard-company Motherboard-Needed Type Total-Amount\n"); printf("-----------------------------------------------------------------------------"); while(fscanf(yogi1,"%s %s %d %s %d",e.name,e.co,&e.as,&e.zx,&e.bs)!=EOF) printf("\n\n%s\t\t%s\t\t\t%d\t\t%s\t%d",e.name,e.co,e.as,e.zx,e.bs); getch(); goto large; break; } default: goto large; } } else if(a==3) { clrscr(); printf("\t\t\t\tLIST"); printf("\n\nSr.No.\tPRODUCT \tCOMPANY ITEM \t TYPE \t AMOUNT(Rs/)"); printf("\n-------------------------------------------------------------------------"); printf("\n\n\n\n1:\tProcessor \tintel \tdual-core \t1.28-GHZ \t 3900"); printf("\n\n2:\tProcessor \tIntel \tdual-core \t2.80-GHZ \t 4500"); printf("\n\n3:\tProcessor \tIntel \tcore-2-due\t1.28-GHZ \t 4900"); printf("\n\n4:\tProcessor \tIntel \tcore-2-due\t2.80-GHZ \t 6100"); printf("\n\n5:\tProcessor \tIntel \tQuantam-Core\t3.20-GHZ\t12000"); printf("\n\n6:\tProcessor \tIntel \tPantium 4 \t1.28-GHZ \t 2700"); printf("\n\n7:\tProcessor \tAMD \tAtalon \t1.28-GHZ \t 2600"); printf("\n\nPress any key ...."); getch(); clrscr(); printf("\t \t \t \t LIST"); printf("\n\nSr.No.\tPRODUCT \tCOMPANY ITEM \t TYPE \t AMOUNT(Rs/)"); printf("\n-------------------------------------------------------------------------"); printf("\n\n\n\n8:\tProcessor \tAMD \t3600+ \t2.80-GHZ \t 4300"); printf("\n\n9:\tProcessor \tAMD \t6000+ \t3.20-GHZ \t 9000"); printf("\n\n10:\tPrinter \tHP \tprinter \tInkjet \t 1900"); printf("\n\n11:\tPrinter \tHP \tprinter \tLaser \t 3900"); printf("\n\n12:\tPrinter \tLG \tPrinter \tInkjet \t 1800"); printf("\n\n13:\tPrinter \tLG \tPrinter \tLaser \t 3700"); printf("\n\n14:\tPrinter \tother \tPrinter \tInkjet \t 1790"); printf("\n\nPress any key ...."); getch(); clrscr(); printf("\t \t \t \t LIST"); printf("\n\nSr.No.\tPRODUCT \tCOMPANY ITEM \t TYPE \t AMOUNT(Rs/)"); printf("\n-------------------------------------------------------------------------"); printf("\n\n\n\n15:\tPrinter \tother \tPrinter \tLaser \t 3700"); printf("\n\n16:\tMonitor \tLG \tCRT-Monitor\t17(inch) \t 3100"); printf("\n\n17:\tMonitor \tLG \tCRT-Monitor\t19(inch) \t 3400"); printf("\n\n18:\tMonitor \tLG \tTFT-Monitor\t17(inch) \t 6900"); printf("\n\n19:\tMonitor \tLG \tTFT-Monitor\t17(inch) \t 9500"); printf("\n\n20:\tRAM \tUmax \t512(MB) \tDDR1 \t 670"); printf("\n\n21:\tRAM \tUmax \t999(MB) \tDDR1 \t 910"); printf("\n\nPress any key ...."); getch(); clrscr(); printf("\t \t \t \t LIST"); printf("\n\nSr.No.\tPRODUCT \tCOMPANY ITEM \t TYPE \t AMOUNT(Rs/)"); printf("\n-------------------------------------------------------------------------"); printf("\n\n\n\n22:\tRAM \tUmax \t512(MB) \tDDR2 \t 600"); printf("\n\n23:\tRAM \tUmax \t999(MB) \tDDR2 \t 800"); printf("\n\n24:\tRAM \tKing/st\t512(MB) \tDDR1/2 \t 700"); printf("\n\n25:\tRAM \tKing/st\t999(MB) \tDDR1/2 \t 910"); printf("\n\n26:\tRAM \tother \t512(MB) \tDDR1 \t 630"); printf("\n\n27:\tRAM \tother \t999(MB) \tDDR1 \t 870"); printf("\n\n28:\tRAM \tother \t512(MB) \tDDR2 \t 600"); printf("\n\nPress any key ...."); getch(); clrscr(); printf("\t \t \t \t LIST"); printf("\n\nSr.No.\tPRODUCT \tCOMPANY ITEM \t TYPE \t AMOUNT(Rs/)"); printf("\n-------------------------------------------------------------------------"); printf("\n\n\n\n29:\tRAM \tother \t999(MB) \tDDR2 \t 790"); printf("\n\n30:\tPen-Drive\tALL \tPer(GB) \tALL \t 320"); printf("\n\n31:\tCabinate \ti-ball\tCabinate \tALL \t 580"); printf("\n\n32:\tCabinate \tHP \tCabinate \tALL \t 610"); printf("\n\n33:\tCabinate \tother \tCabinate \tALL \t 510"); printf("\n\n34:\tMotherboard\tALL \tMotherboard\t945 \t3500"); printf("\n\n35:\tMotherboard\tALL \tMotherboard\t1024 \t4600"); printf("\n\nPress any to exit ....."); getch(); goto large; } else if(a==4) { clrscr(); printf("\n\n\n\n\n\n\n\n\n\n\n\n\n********************************************************************************"); printf("\n\t\t\tThank's for coming."); printf("\n\n********************************************************************************"); printf("\n\n\n\n\n\n\n\n\n\n\n\n\n\t\t\t\t\t\t\t\tProject by:"); printf("\n\t\t\t\t\t\t\t\tYogesh Mehla"); getch(); exit(0); } else goto large; getch(); }
Download Game from here.
|
|
|