INVENTORY PERPUSTAKAAN
#include <conio.h>
#include <stdio.h>
#include <iostream.h>
main()
{
int kb,loker;
char lagi,enter,jb;
atas:
clrscr();
cout<<"\t\t\tPERPUSTAKAAN"<<endl;
cout<<"\t\tAMIKOM CIPTA DARMA SURAKARTA"<<endl;
cout<<"\t\t\t***********\n"<<endl;
cout<<"=============================================<<endl;
cout<<"| Jenis Buku | Kode Buku | Judul Buku | Jumlah Buku |"<<endl;
cout<<"=============================================<<endl;
cout<<"| A | 001 | Akuntansi Dasar | 5 |"<<endl;
cout<<"| | 002 | Akuntansi Menengah | 4 |"<<endl;
cout<<"| | 003 | Akuntansi Lanjutan | 5 |"<<endl;
cout<<"--------------------------------------------------------------------"<<endl;
cout<<"| M | 004 | Corel Draw X4 | 7 |"<<endl;
cout<<"| | 005 | Photoshop CS3 | 4 |"<<endl;
cout<<"| | 006 | After Effect CS3 | 6 |"<<endl;
cout<<"| | 007 | Premiere Pro CS3 | 5 |"<<endl;
cout<<"-------------------------------------------------------------------"<<endl;
cout<<"| P | 010 | Turbo Pascal | 4 |"<<endl;
cout<<"| | 011 | Turbo C++ | 3 |"<<endl;
cout<<"| | 012 | Java | 5 |"<<endl;
cout<<"| | 013 | Delphi | 5 |"<<endl;
cout<<"============================================"<<endl;
cout<<"\n"<<endl;
{
cout<<"Ketik Jenis Buku : ";cin>>jb;
cout<<"Ketik Kode Buku : ";cin>>kb;
if (jb=='A')
switch(kb)
{
case 001:loker=1;break;
case 002:loker=2;break;
case 003:loker=3;break;
default:loker=0;break;
}
else if (jb=='M')
switch(kb)
{
case 004:loker=4;break;
case 005:loker=5;break;
case 006:loker=6;break;
case 007:loker=7;break;
default:loker=0;break;
}
else if (jb=='P')
switch(kb)
{
case 010:loker=8;break;
case 011:loker=9;break;
case 012:loker=10;break;
case 013:loker=11;break;
default:loker=0;break;
}
else
{cout<<"\nMaaf, Anda salah memasukan Jenis Buku (GUNAKAN HURUF KAPITAL)";
cout<<"\nMOHON TEKAN (N) LALU ENTER UNTUK MENCARI KEMBALI : ";cin>>enter;
if(enter=='N'||enter=='n')
goto atas;
else
cout<<"\tDATA EROR";
goto bawah;}
cout<<"_____________________"<<endl;
cout<<"Nomor Loker Buku : "<<loker<<endl;
}
cout<<"\nIngin Cari Lagi [Y/N] : ";cin>>lagi;
if (lagi=='Y'||lagi=='y')
goto atas;
else
cout<<"\n SELAMAT BELAJAR "<<endl;
bawah:
getch();
}