Salam Hangat pengunjung terhormat!
Kode C++ Array Tiga Dimensi Tampilan Program Kasir Sederhana
posting kali ini, saya akan membagikan rumus program C++ hasil ciptaan saya . Bagi anda yang sedang membutuhkannya yuk mari kita lihat dan teliti :
dan tampilan ketika di RUN :Kode C++ Array Tiga Dimensi Tampilan Program Kasir Sederhana
posting kali ini, saya akan membagikan rumus program C++ hasil ciptaan saya . Bagi anda yang sedang membutuhkannya yuk mari kita lihat dan teliti :
#include <conio.h> #include <stdio.h> #include <iostream.h> main() { char kasir[10],kodpro[10][10],*jenis[10],*nama[10]; int bayar,kop[10],qty[10],a,b,no,harga[10]; float kembali,total[5]; long sub; cout<<" PD TANI JAYA"<<endl; cout<<" JL.Gn.Sabeulah No.12 TASIKMALAYA"<<endl; cout<<"***********************************************************************"<<endl; cout<<"No.Pesan : ";cin>>no; cout<<"Nama Kasir : ";cin>>kasir; cout<<"Banyak Jenis Produk : ";cin>>b; for(a=1;a<=b;++a) { cout<<"Pilih Jenis Produk : "<<endl; cout<<"1.Pestisida"<<endl; cout<<"2.Benih"<<endl; cout<<"3.Pupuk"<<endl; cout<<"4.Alat Pertanian"<<endl; cout<<"Input Kode [1/2/3/4] : ";cin>>kop[a]; cout<<"Kode Produk : ";cin>>kodpro[a]; cout<<"Qty : ";cin>>qty[a]; if(kop[a]==1) {jenis[a]="Pestisida";} else if(kop[a]==2) {jenis[a]="Benih";} else if(kop[a]==3) {jenis[a]="Pupuk";} else if(kop[a]==4) {jenis[a]="Alat Pertanian";} if(kop[a]==1) {jenis[a]="Pestisida"; if(strcmp(kodpro[a],"dcs")==0||strcmp(kodpro[a],"DCS")==0) {nama[a]="Decis"; harga[a]=89000;} else if(strcmp(kodpro[a],"bldk")==0||strcmp(kodpro[a],"BLDK")==0) {nama[a]="Buldok"; harga[a]=73000;}} else if(kop[a]==2) {jenis[a]="Benih"; if(strcmp(kodpro[a],"wl")==0||strcmp(kodpro[a],"WL")==0) {nama[a]="Wulan"; harga[a]=28000;} else if(strcmp(kodpro[a],"bdn")==0||strcmp(kodpro[a],"BDN")==0) {nama[a]="Bandana"; harga[a]=35000;}} else if(kop[a]==3) {jenis[a]="Pupuk"; if(strcmp(kodpro[a],"mu")==0||strcmp(kodpro[a],"MU")==0) {nama[a]="Nultitonik Umum"; harga[a]=10000;} else if(strcmp(kodpro[a],"bu")==0||strcmp(kodpro[a],"BU")==0) {nama[a]="Biotonik Umum"; harga[a]=6000;}} else if(kop[a]==4) {jenis[a]="Alat Pertanian"; if(strcmp(kodpro[a],"b001")==0||strcmp(kodpro[a],"B001")==0) {nama[a]="Klep Butterfly"; harga[a]=5000;} else if(strcmp(kodpro[a],"s14")==0||strcmp(kodpro[a],"S14")==0) {nama[a]="Swan 14 Liter"; harga[a]=355000;}} } clrscr(); cout<<" Bukti Struk Pembayara "<<endl; cout<<" PD TANI JAYA "<<endl; cout<<" Jl.Gn.Sabeulah No.12 Tasikmalaya "<<endl; cout<<"************************************************************************"<<endl; cout<<"No.Pesan : "<<no<<endl; cout<<"Nama Kasir : "<<kasir<<endl; cout<<"========================================================================"<<endl; cout<<"No. Jenis Nama Qty Harga Total "<<endl; cout<<" Prduk Produk Produk "<<endl; cout<<"========================================================================"<<endl; //12345678901234567890123456789012345678901234567890123456789012345678901234567890 // 1 2 3 4 5 6 7 8 sub=0; for(a=1;a<=b;++a) { gotoxy(1,a+11); cout<<a; gotoxy(7,a+11);cout<<jenis[a]; gotoxy(23,a+11);cout<<nama[a]; gotoxy(38,a+11);cout<<qty[a]; gotoxy(45,a+11);cout<<harga[a]; total[a]=qty[a]*harga[a]; gotoxy(57,a+11);cout<<total[a]; sub=sub+total[a]; cout<<endl; } cout<<"\n===================================================================="<<endl; cout<<" Subtotal : "<<sub<<endl; cout<<" Bayar : ";cin>>bayar; kembali=bayar-sub; cout<<" Kembali : "<<kembali<<endl; cout<<" Barang Yang Sudah dibeli Tidak Dapat dikembalikan!"<<endl; cout<<" TERIMA KASIH"<<endl; getch(); }
sukses.... :)
creaty by : Alfy Maghfira (for Tani Jaya Mycompany)
Kode C++ Array Tiga Dimensi -Tampilan Program Kasir Sederhana
9 Out Of 10 Based On 10 Ratings. 9 User Reviews.
Artikel yang baru saja Anda baca berkategori Pemrograman
dengan judul Kode C++ Array Tiga Dimensi -Tampilan Program Kasir Sederhana. Anda bisa bookmark halaman ini dengan URL https://aksesdataseru.blogspot.com/2013/06/kode-c-array-tiga-dimensi-tampilan.html. Terima kasih!
Ditulis oleh:
Alfy Maghfira - Monday, 10 June 2013
Sukses selalu gan... keep support
ReplyDeleteSoftware Toko