Program Penjualan RC...
#include<stdio.h>
#include<conio.h>
#include<windows.h>
main()
{
system ("color 4f");
printf("\n __________________________________");
printf("\n | |");
printf("\n | WELCOME |");
printf("\n | RUKU CO'MO |");
printf("\n | ATK,FOTOCOPY,DLL |");
printf("\n |__________________________________|");
printf("\n\n");
int mado;
MENU:
printf ("Menu Pilihan :\n");
printf ("===============\n");
printf ("1. Penjualan ATK\n");
printf ("2. Fotocopy\n");
printf ("3. Penghasilan\n");
printf ("4. Peminjaman Uang Karyawan\n");
printf ("5. Exit\n");
printf ("Masukan Pilihan [1-5] :");scanf("%d",&mado);
printf ("===============================\n");
if (mado == 1)
{
printf("\n\n DAFTAR HARGA ALAT TULIS");
printf("\n =====================================\n");
printf("\n 1. Pulpen = Rp. 5.000");
printf("\n 2. Kertas HVS = Rp. 26.000");
printf("\n 3. Correction pen = Rp. 2.500");
printf("\n 4. Kertas Linen = Rp. 10.000");
printf("\n 5. Kertas Origami = Rp. 5.000");
printf("\n 6. Perlengkapan Ujian = Rp. 25.000");
printf("\n 7. Map = Rp. 7.000");
printf("\n =====================================\n");
int atk,jm1,tunai;
float bayar,hrg,kembalian;
printf("\n\n Masukkan Kode Alat Tulis [1-7] : "); scanf("%d", &atk);
printf("\n Masukkan Jumlah Beli : "); scanf("%d", &jm1);
switch(atk)
{
case 1:
hrg= 5000*jm1;
printf("\n Alat Tulis Yang Anda Pilih : Pulpen\n");
printf("\n Harga : Rp. 5.000");
printf("\n Total : Rp. %1.1f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 2:
hrg= 26000*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Kertas HVS\n");
printf("\n Harga : Rp. 26.000");
printf("\n Total : Rp. %.2f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 3:
hrg= 2500*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Correction Pen\n");
printf("\n Harga : Rp. 2500");
printf("\n Total : Rp. %.2f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 4:
hrg= 10000*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Kertas Linen\n");
printf("\n Harga : Rp. 10.000");
printf("\n Total : Rp. %.2f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 5:
hrg= 5000*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Kertas Origami\n");
printf("\n Harga : Rp. 5.000");
printf("\n Total : Rp. %.2f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 6:
hrg= 25000*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Perlengkapan Ujian\n");
printf("\n Harga : Rp. 25.000");
printf("\n Total : Rp. %1.1f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 7:
hrg= 7000*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Map\n");
printf("\n Harga : Rp. 7.000");
printf("\n Total : Rp. %1.1f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
}
printf ("\nTekan Enter Untuk Kembali Ke MENU PILIHAN\n");
getch();
{
goto MENU;
}
}
if (mado == 2)
{
int jml,kode,tunai;
float harga,bayar,total,kembalian;
printf ("<<<<<Menu Pilihan>>>>>\n");
printf ("=======================\n");
printf ("1. Biasa Rp.150/Lembar\n");
printf ("2. Timbal Balik Rp.200/Lembar\n");
printf ("3. Kertas A3 Rp.500/Lembar\n");
printf ("\nMasukan Pilihan [1-3] :");scanf("%d",&kode);
printf ("=======================\n");
if (kode == 1)
{
printf("Masukan Jumlah Lembar Fotocopy = ");scanf("%d",&jml);
printf("\n\n\n\n");
printf("=====================================\n");
printf("\t Ruku Co'mo \n");
printf("\t Takalar Sul-Sel \n");
printf("=====================================\n");
harga=150;
printf(" Harga = Rp. %1.1f \n",harga);
printf(" Jumlah Beli = Rp. %d \n",jml);
bayar = jml*harga;
printf(" Maka Bayar = Rp. %1.1f \n",bayar);
total = bayar;
printf("===================================(+)\n");
printf(" Total = Rp. %1.1f \n",total);
printf(" Tunai = Rp. ");scanf("%d",&tunai);
printf("===================================(-)\n");
kembalian = tunai-total;
printf(" Kembalian = Rp. %1.1f \n",kembalian);
printf("=====================================\n");
printf("\t Terima Kasih\n");
printf("-------------------------------------\n");
}
else if (kode == 2)
{
printf("Masukan Jumlah Lembar Fotocopy = ");scanf("%d",&jml);
printf("\n\n\n\n\n");
printf("=====================================\n");
printf("\t Ruku Co'mo \n");
printf("\t Takalar Sul-Sel \n");
printf("=====================================\n");
harga=200;
printf(" Harga = Rp. %1.1f \n",harga);
printf(" Jumlah Beli = Rp. %d \n",jml);
bayar = jml*harga;
printf(" Maka Bayar = Rp. %1.1f \n",bayar);
total = bayar;
printf("===================================(+)\n");
printf(" Total = Rp. %1.1f \n",total);
printf(" Tunai = Rp. ");scanf("%d",&tunai);
printf("===================================(-)\n");
kembalian = tunai-total;
printf(" Kembalian = Rp. %1.1f \n",kembalian);
printf("=====================================\n");
printf("\t Terima Kasih\n");
printf("-------------------------------------\n");
}
else if (kode == 3)
{
printf("Masukan Jumlah Lembar Fotocopy = ");scanf("%d",&jml);
printf("\n\n\n\n\n");
printf("=====================================\n");
printf("\t Ruku Co'mo \n");
printf("\t Takalar Sul-Sel \n");
printf("=====================================\n");
harga=500;
printf(" Harga = Rp. %1.1f \n",harga);
printf(" Jumlah Beli = Rp. %d \n",jml);
bayar = jml*harga;
printf(" Maka Bayar = Rp. %1.1f \n",bayar);
total = bayar;
printf("===================================(+)\n");
printf(" Total = Rp. %1.1f \n",total);
printf(" Tunai = Rp. ");scanf("%d",&tunai);
printf("===================================(-)\n");
kembalian = tunai-total;
printf(" Kembalian = Rp. %1.1f \n",kembalian);
printf("=====================================\n");
printf("\t Terima Kasih\n");
printf("-------------------------------------\n");}
printf ("\nTekan Enter Untuk Kembali Ke MENU PILIHAN\n");
getch();
{
goto MENU;
}
}
if (mado == 3)
{
int pn,pe;
float total;
printf("Penghasilan Hari Ini = Rp. ");scanf("%d",&pn);
printf("Pengeluaran Hari Ini = Rp. ");scanf("%d",&pe);
printf("=====================================\n");
printf("\t RC \n");
printf("\t RUKU CO'MO \n");
printf("=====================================\n");
total = pn-pe;
printf(" Total Penghasilan Hari Ini = Rp. %1.1f \n",total);
printf("=====================================\n");
printf("\t Terima Kasih\n");
printf("-------------------------------------\n");
printf ("\nTekan Enter Untuk Kembali Ke MENU PILIHAN\n");
getch();
{
goto MENU;
}
}
if (mado == 4)
{
char *pNamaKaryawan[5]={"Asrul Utte","Enal","Gassing","Anto","Amar Opa"}; /*Pointer*/
int x,jml,harga,tunai;
float diskon,bayar,total,kembalian;
{
printf ("\n Nama Karyawan ");
printf ("\n 1. Asrul Utte ");
printf ("\n 2. Enal ");
printf ("\n 3. Gassing ");
printf ("\n 4. Anto ");
printf ("\n 5. Amar Opa ");
}
printf ("\n\n Masukkan Kode(1-5) : "); scanf("%d",&x);
x=x-1;
printf("Selamat Datang %s",pNamaKaryawan[x]);
printf ("\n\n");
printf("Banyaknya Pinjaman = ");scanf("%d",&harga);
printf("Lamanya Pinjaman (Hari) = ");scanf("%d",&jml);
printf("=====================================\n");
printf("\t Cahaya Surya \n");
printf("\t Makassar Sul-Sel \n");
printf("=====================================\n");
printf(" Nama Karyawan = %s\n",pNamaKaryawan[x]);
printf(" Pinjaman = Rp. %d \n",harga);
printf(" Lamanya Pinjaman = %d Hari \n",jml);
printf("=====================================\n");
printf("\t Terima Kasih\n");
printf("-------------------------------------\n");
printf ("\nTekan Enter Untuk Kembali Ke MENU PILIHAN\n");
getch();
{
goto MENU;
}
}
if(mado == 5)
{
printf ("Terima kasih telah menggunakan program kami\n");
return 0;
}
getch();
}
#include<conio.h>
#include<windows.h>
main()
{
system ("color 4f");
printf("\n __________________________________");
printf("\n | |");
printf("\n | WELCOME |");
printf("\n | RUKU CO'MO |");
printf("\n | ATK,FOTOCOPY,DLL |");
printf("\n |__________________________________|");
printf("\n\n");
int mado;
MENU:
printf ("Menu Pilihan :\n");
printf ("===============\n");
printf ("1. Penjualan ATK\n");
printf ("2. Fotocopy\n");
printf ("3. Penghasilan\n");
printf ("4. Peminjaman Uang Karyawan\n");
printf ("5. Exit\n");
printf ("Masukan Pilihan [1-5] :");scanf("%d",&mado);
printf ("===============================\n");
if (mado == 1)
{
printf("\n\n DAFTAR HARGA ALAT TULIS");
printf("\n =====================================\n");
printf("\n 1. Pulpen = Rp. 5.000");
printf("\n 2. Kertas HVS = Rp. 26.000");
printf("\n 3. Correction pen = Rp. 2.500");
printf("\n 4. Kertas Linen = Rp. 10.000");
printf("\n 5. Kertas Origami = Rp. 5.000");
printf("\n 6. Perlengkapan Ujian = Rp. 25.000");
printf("\n 7. Map = Rp. 7.000");
printf("\n =====================================\n");
int atk,jm1,tunai;
float bayar,hrg,kembalian;
printf("\n\n Masukkan Kode Alat Tulis [1-7] : "); scanf("%d", &atk);
printf("\n Masukkan Jumlah Beli : "); scanf("%d", &jm1);
switch(atk)
{
case 1:
hrg= 5000*jm1;
printf("\n Alat Tulis Yang Anda Pilih : Pulpen\n");
printf("\n Harga : Rp. 5.000");
printf("\n Total : Rp. %1.1f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 2:
hrg= 26000*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Kertas HVS\n");
printf("\n Harga : Rp. 26.000");
printf("\n Total : Rp. %.2f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 3:
hrg= 2500*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Correction Pen\n");
printf("\n Harga : Rp. 2500");
printf("\n Total : Rp. %.2f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 4:
hrg= 10000*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Kertas Linen\n");
printf("\n Harga : Rp. 10.000");
printf("\n Total : Rp. %.2f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 5:
hrg= 5000*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Kertas Origami\n");
printf("\n Harga : Rp. 5.000");
printf("\n Total : Rp. %.2f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 6:
hrg= 25000*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Perlengkapan Ujian\n");
printf("\n Harga : Rp. 25.000");
printf("\n Total : Rp. %1.1f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
case 7:
hrg= 7000*jm1;
printf("\n Alat Tulis Yang Anda Pilih: Map\n");
printf("\n Harga : Rp. 7.000");
printf("\n Total : Rp. %1.1f\n",hrg);
printf(" ----------------------------------------");
printf(" Tunai : Rp. ");scanf("%d",&tunai);
printf(" ========================================\n");
kembalian = tunai-hrg;
printf(" Kembalian : Rp. %1.1f \n",kembalian);
printf(" ========================================\n");
printf("\t Terima Kasih\n");
printf(" ----------------------------------------\n");
break;
}
printf ("\nTekan Enter Untuk Kembali Ke MENU PILIHAN\n");
getch();
{
goto MENU;
}
}
if (mado == 2)
{
int jml,kode,tunai;
float harga,bayar,total,kembalian;
printf ("<<<<<Menu Pilihan>>>>>\n");
printf ("=======================\n");
printf ("1. Biasa Rp.150/Lembar\n");
printf ("2. Timbal Balik Rp.200/Lembar\n");
printf ("3. Kertas A3 Rp.500/Lembar\n");
printf ("\nMasukan Pilihan [1-3] :");scanf("%d",&kode);
printf ("=======================\n");
if (kode == 1)
{
printf("Masukan Jumlah Lembar Fotocopy = ");scanf("%d",&jml);
printf("\n\n\n\n");
printf("=====================================\n");
printf("\t Ruku Co'mo \n");
printf("\t Takalar Sul-Sel \n");
printf("=====================================\n");
harga=150;
printf(" Harga = Rp. %1.1f \n",harga);
printf(" Jumlah Beli = Rp. %d \n",jml);
bayar = jml*harga;
printf(" Maka Bayar = Rp. %1.1f \n",bayar);
total = bayar;
printf("===================================(+)\n");
printf(" Total = Rp. %1.1f \n",total);
printf(" Tunai = Rp. ");scanf("%d",&tunai);
printf("===================================(-)\n");
kembalian = tunai-total;
printf(" Kembalian = Rp. %1.1f \n",kembalian);
printf("=====================================\n");
printf("\t Terima Kasih\n");
printf("-------------------------------------\n");
}
else if (kode == 2)
{
printf("Masukan Jumlah Lembar Fotocopy = ");scanf("%d",&jml);
printf("\n\n\n\n\n");
printf("=====================================\n");
printf("\t Ruku Co'mo \n");
printf("\t Takalar Sul-Sel \n");
printf("=====================================\n");
harga=200;
printf(" Harga = Rp. %1.1f \n",harga);
printf(" Jumlah Beli = Rp. %d \n",jml);
bayar = jml*harga;
printf(" Maka Bayar = Rp. %1.1f \n",bayar);
total = bayar;
printf("===================================(+)\n");
printf(" Total = Rp. %1.1f \n",total);
printf(" Tunai = Rp. ");scanf("%d",&tunai);
printf("===================================(-)\n");
kembalian = tunai-total;
printf(" Kembalian = Rp. %1.1f \n",kembalian);
printf("=====================================\n");
printf("\t Terima Kasih\n");
printf("-------------------------------------\n");
}
else if (kode == 3)
{
printf("Masukan Jumlah Lembar Fotocopy = ");scanf("%d",&jml);
printf("\n\n\n\n\n");
printf("=====================================\n");
printf("\t Ruku Co'mo \n");
printf("\t Takalar Sul-Sel \n");
printf("=====================================\n");
harga=500;
printf(" Harga = Rp. %1.1f \n",harga);
printf(" Jumlah Beli = Rp. %d \n",jml);
bayar = jml*harga;
printf(" Maka Bayar = Rp. %1.1f \n",bayar);
total = bayar;
printf("===================================(+)\n");
printf(" Total = Rp. %1.1f \n",total);
printf(" Tunai = Rp. ");scanf("%d",&tunai);
printf("===================================(-)\n");
kembalian = tunai-total;
printf(" Kembalian = Rp. %1.1f \n",kembalian);
printf("=====================================\n");
printf("\t Terima Kasih\n");
printf("-------------------------------------\n");}
printf ("\nTekan Enter Untuk Kembali Ke MENU PILIHAN\n");
getch();
{
goto MENU;
}
}
if (mado == 3)
{
int pn,pe;
float total;
printf("Penghasilan Hari Ini = Rp. ");scanf("%d",&pn);
printf("Pengeluaran Hari Ini = Rp. ");scanf("%d",&pe);
printf("=====================================\n");
printf("\t RC \n");
printf("\t RUKU CO'MO \n");
printf("=====================================\n");
total = pn-pe;
printf(" Total Penghasilan Hari Ini = Rp. %1.1f \n",total);
printf("=====================================\n");
printf("\t Terima Kasih\n");
printf("-------------------------------------\n");
printf ("\nTekan Enter Untuk Kembali Ke MENU PILIHAN\n");
getch();
{
goto MENU;
}
}
if (mado == 4)
{
char *pNamaKaryawan[5]={"Asrul Utte","Enal","Gassing","Anto","Amar Opa"}; /*Pointer*/
int x,jml,harga,tunai;
float diskon,bayar,total,kembalian;
{
printf ("\n Nama Karyawan ");
printf ("\n 1. Asrul Utte ");
printf ("\n 2. Enal ");
printf ("\n 3. Gassing ");
printf ("\n 4. Anto ");
printf ("\n 5. Amar Opa ");
}
printf ("\n\n Masukkan Kode(1-5) : "); scanf("%d",&x);
x=x-1;
printf("Selamat Datang %s",pNamaKaryawan[x]);
printf ("\n\n");
printf("Banyaknya Pinjaman = ");scanf("%d",&harga);
printf("Lamanya Pinjaman (Hari) = ");scanf("%d",&jml);
printf("=====================================\n");
printf("\t Cahaya Surya \n");
printf("\t Makassar Sul-Sel \n");
printf("=====================================\n");
printf(" Nama Karyawan = %s\n",pNamaKaryawan[x]);
printf(" Pinjaman = Rp. %d \n",harga);
printf(" Lamanya Pinjaman = %d Hari \n",jml);
printf("=====================================\n");
printf("\t Terima Kasih\n");
printf("-------------------------------------\n");
printf ("\nTekan Enter Untuk Kembali Ke MENU PILIHAN\n");
getch();
{
goto MENU;
}
}
if(mado == 5)
{
printf ("Terima kasih telah menggunakan program kami\n");
return 0;
}
getch();
}
Comments
Post a Comment