Aplikasi Kasir Rumah Makan - Belajar Pemrograman Dasar
Headlines News :
Home » » Aplikasi Kasir Rumah Makan

Aplikasi Kasir Rumah Makan

Written By Kopi Lelet Lasem - Rembang on Jumat, 29 Juni 2012 | 11.53


APLIKASI KASIR RUMAH MAKAN

Copast listing program dibawah ke notepad dan simpan dengan ekstensi c, misal (kasir.c)

#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<dos.h>
#include<graphics.h>


  void pass()
{
char user[10],pass[10];
char u[10],p[10],ulang;
int pilih;
int rames,pecel,ayam,gorengan,kerupuk,teh,jeruk,campur;
float harga,total;
int i;


clrscr();
textcolor(115);
gotoxy(35,16);cprintf(" USER         :                  ");
gotoxy(35,17);cprintf(" PASSWORD     :           ");
gotoxy(52,16);scanf("%s",user);
gotoxy(52,17);textcolor(0);cscanf("%s",&pass);


//MENENTUKAN HARGA MAKANAN & MINUMAN


rames=4000;
pecel=3000;
ayam=5000;
gorengan=1000;
kerupuk=500;
teh=1500;
jeruk=2000;
campur=4000;


clrscr();
do
{
gotoxy(45,3); textcolor(115);cprintf("SISTEM KASIR RUMAH MAKAN");
gotoxy(4,6); textcolor(110);cprintf("Tanggal =                                           USER = %s",user);


 // *Menampilkan menu*
gotoxy(5,8);  textcolor(115);cprintf(" * DAFTAR PILIHAN MENU *                    ** DAFTAR MENU YANG DIPILIH **");
gotoxy(2,10); textcolor(118);cprintf(" 1. NASI RAMES     Rp. %d",rames);
gotoxy(2,11); textcolor(118);cprintf(" 2. NASI PECEL     Rp. %d",pecel);
gotoxy(2,12); textcolor(118);cprintf(" 3. NASI AYAM      Rp. %d",ayam);
gotoxy(2,13); textcolor(116);cprintf(" 4. THE GORENGAN   Rp. %d",gorengan);
gotoxy(2,14); textcolor(116);cprintf(" 5. THE KERUPUK    Rp. %d",kerupuk);
gotoxy(2,15); textcolor(117);cprintf(" 6. ES/PANAS TEH   Rp. %d",teh);
gotoxy(2,16); textcolor(117);cprintf(" 7. ES/PANAS JERUK Rp. %d",jeruk);
gotoxy(2,17); textcolor(117);cprintf(" 8. ES CAMPUR      Rp. %d",campur);


gotoxy(5,19); textcolor(115);cprintf("INPUT PILIHAN MENU DISINI =  ");


gotoxy(3,21); textcolor(115);cprintf("KETERANGAN >>  * PILIH MENU SESUAI ANGKA YANG TERTERA");
gotoxy(3,22); textcolor(115);cprintf("               * TEKAN 9 UNTUK TOTAL");


//INPUT MENU SESUAI ANGKA
i=10;
total=0;
do
{
gotoxy(33,19); scanf("%d",&pilih);
switch(pilih)
{
case 1 :
gotoxy(44,i);textcolor(115); cprintf("- NASI RAMES");
total=total+rames;
break;
case 2 :
gotoxy(44,i);textcolor(115);cprintf("- NASI PECEL");
total=total+pecel;
break;
case 3 :
gotoxy(44,i);textcolor(115); cprintf("- NASI AYAM");
total=total+ayam;
break;
case 4 :
gotoxy(44,i);textcolor(115); cprintf("- THE GORENGAN");
total=total+gorengan;
break;
case 5 :
gotoxy(44,i);textcolor(115); cprintf("- THE KERUPUK");
total=total+kerupuk;
break;
case 6 :
gotoxy(44,i);textcolor(115); cprintf("- ES/PANAS TEH");
total=total+teh;
break;
case 7 :
gotoxy(44,i);textcolor(115); cprintf("- ES/PANAS JERUK");
total=total+jeruk;
break;
case 8 :
gotoxy(44,i);textcolor(115); cprintf("- ES CAMPUR");
total=total+campur;
break;
}
gotoxy(44,19); textcolor(110);cprintf("total = %.2f",total);
i++;
}
while (pilih!=9);
gotoxy(5,19); textcolor(115);cprintf("TEKAN Y/T UNTUK MENGULANG/KELUAR   =  ");
gotoxy(42,19); scanf("%s",&ulang);
}
while (ulang=='Y' || ulang=='y');
clrscr();
gotoxy(30,12);printf("   TERIMAKASIH   ");
gotoxy(30,14);printf(" copyright 2012 ");
gotoxy(30,16);printf(" BY APEL KROWAK©");
getch();
  }
  void main()
 {
  clrscr();
  pass();
  getch();
}
Share this article :

0 komentar:

Speak up your mind

Tell us what you're thinking... !

 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Belajar Pemrograman Dasar - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger