[Studi kasus] Program Pencatat Pasien Menggunakan Nested If - TeachMeSoft

[Studi kasus] Program Pencatat Pasien Menggunakan Nested If

[Studi kasus] Program Pencatat Pasien Menggunakan Nested If

Studi kasus


Rumah Sakit Nirmala membutuhkan sebuah aplikasi pencatatan pasien. Setiap pasien akan dicatat umurnya.

Jika umurnya lebih dari sama dengan 17 tahun maka akan dimintai kartu pengenal berupa KTP, dan akan mengisi data berupa nik, nama, nama orang tua, alamat, jenis kelamin dan usia.

jika umurnya di bawah 17 tahun, maka kartu pengenal yang diminta berupa kartu pelajar atau KTP orang tua/wali, dan mengisi data berupa no identitas, nama, nama orang tua, alamat, jenis kelamin dan usia. Setelah itu akan ditanya, akan mengambil perawatan rawat inap atau rawat jalan.

Jika rawat inap maka akan memilih kelas kamar dan selanjutnya memasukkan lama menginap. Sedangkan untuk rawat jalan akan ditanya jenis periksa, kemudian hanya dikenakan biaya periksa dan biaya obat. Saat proses pembayaran akan ditanya jenis pembayarannya, akan menggunakan BPJS atau umum.


Jika umum maka tidak ada potongan biaya. Sedangkan jika menggunakan BPJS, akan mendapatkan potongan sesuai kelas BPJS.

Buatlah program untuk rumah sakit tersebut. Dengan ketentuan:
1. Kelas kamar:
  • Kelas VVIP ⇒ Rp 1.000.000 per malam 
  • Kelas VIP ⇒ Rp 700.000 per malam 
  • Kelas I ⇒ Rp 400.000 per malam 
  • Kelas II ⇒ Rp 250.000 per malam 
  • Kelas III ⇒ Rp 100.000 per malam 
2. Harga obat = 75.000 /periksa
3. Jenis Periksa:
  • Dokter Umum ⇒ Rp 65.000 
  • Poli Gigi ⇒ Rp 85.000 
  • Poli THT ⇒ Rp 75.000 
  • Poli Anak ⇒ Rp 60.000 
  • Poli Kebidanan dan Penyakit Kandungan ⇒ Rp 85.500 
4. Potongan biaya berdasarkan kelas BPJS
  • BPJS Kelas I 
    • Potongan biaya 95 % untuk total biaya lebih dari sama dengan Rp 2.000.000 
    • Potongan biaya 85 % untuk total biaya kurang dari Rp 2.000.000 
  • BPJS Kelas II 
    • Potongan biaya 80% untuk total biaya lebih dari sama dengan 1.500.000 
    • Potongan biaya 70% untuk total biaya kurang dari 1.500.000 
  • BPJS Kelas III 
    • Potongan biaya 75% untuk total biaya lebih dari sama dengan 1.000.000 
    • Potongan biaya 75% untuk total biaya kurang dari 1.000.000 
5. Tampilkan data diri pasien, umur, jenis kartu pengenal, jenis perawatan, detail masing-masing biaya, total biaya, jenis pembayaran, potongan biaya, total yang harus dibayar.


Flowchart


Flowchart


Source code


#include <iostream>; /*Instruksi agar file header dengan nama iostream dimasukan ke dalam file program C++, sehingga dengan itu perintah cou dapat diakses/dijalankan*/
#include <Windows.h>;//standard library buat tipe data HANDLE, fungsi GetStdHandle dan prosedur SetConsoleTextAtrribute

using namespace std;

int main () //Deklarasi bahwa setelah program dieksekusi maka akan mengembalikan nilai tertentu (dalam hal ini adaah 0) kepada pemanggil/OS
{
string id,nm,nmo,al,jk,us,rwt,rip,bu,kp;
long int umur,lmp,PKPK,PG,THT,PA,DG,HB,VVIP,VIP,I,II,III,total,total2,total3;

cout <<"======================================================\n";
cout <<"| SELAMAT DATANG RUMAH SAKIT NIRMALA |\n";
cout <<"| Aplikasi Pencatat Pasien |\n";
cout <<"| Jl.Ringroad Utara, Jombor, Sendangadi, 55285 |\n";
cout <<"======================================================\n";

cout <<"Berapa Umur Anda : ";cin>>umur;cout<<endl;
if( umur> 0 && umur <17 ){
cout <<"------------------------------------------------------\n";
cout <<"Sertakan Kartu Pelajar atau KTP Orang/ Wali\n";
cout <<"------------------------------------------------------\n";
cout <<"Tanda Pengenal : ";cin>>kp;cout<<endl;
cout <<"No Identitas : ";cin>>id;cout<<endl;
cout <<"Nama : ";cin>>nm;cout<<endl;
cout <<"Nama Orang Tua : ";cin>>nmo;cout<<endl;
cout <<"Alamat : ";cin>>al;cout<<endl;
cout <<"Jenis Kelamin : ";cin>>jk;cout<<endl;
cout <<"Usia : ";cin>>us;cout<<endl;
cout <<"------------------------------------------------------\n";
cout <<"Mau Rawat Inap Atau Rawat Jalan <ri/rj> : ";cin>>rwt;cout<<endl;
cout <<"------------------------------------------------------\n";
if (rwt=="ri"){
//Kelas kamar Per malam
VVIP = 1000000;
VIP = 700000;
I = 400000;
II = 250000;
III = 100000;
cout <<"Pilih Jenis Kelas Kamar <VVIP/VIP/I/II/III> : ";cin>>rip;cout<<endl;
if (rip=="VVIP"){
cout <<"Lama Menginap : ";cin>>lmp;cout<<endl;
total=VVIP*lmp;
cout <<"_______________________________________________________\n";
cout <<"| Kamar Anda Kelas VVIP |\n";
cout <<"|_____________________________________________________|\n";
cout <<"Pembayaran <BPJS/UMUM> : ";cin>>bu;cout<<endl;
if(bu=="BPJS"){
cout <<"_______________________________________________________\n";
cout <<"| SELAMAT DATANG MEMBER BPJS |\n";
cout <<"|_____________________________________________________|\n";
cout <<"| Berikut Kelas BPJS : |\n";
cout <<"| + BPJS Kelas I |\n";
cout <<"| + BPJS Kelas II |\n";
cout <<"| + BPJS Kelas III |\n";
cout <<"|_____________________________________________________|\n";
cout <<"Pilih Kelas BPJS <I/II/II> : ";cin>>bu;cout<<endl;
if(bu=="I"){
if(total>=2000000){
total2=total*0.95;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VVIP : Rp.";cout<<VVIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas I\n";
cout <<" * Potongan Biaya (95%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<2000000){
total2=total*0.85;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VVIP : Rp.";cout<<VVIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas I\n";
cout <<" * Potongan Biaya (85%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}

}else if (bu=="II"){
if(total>=1500000){
total2=total*0.80;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VVIP : Rp.";cout<<VVIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas II\n";
cout <<" * Potongan Biaya (80%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<1500000){
total2=total*0.70;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VVIP : Rp.";cout<<VVIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas II\n";
cout <<" * Potongan Biaya (70%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}

}else if (bu=="III"){
if(total>=1000000){
total2=total*0.75;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VVIP : Rp.";cout<<VVIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas III\n";
cout <<" * Potongan Biaya (75%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<1000000){
total2=total*0.70;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VVIP : Rp.";cout<<VVIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas III\n";
cout <<" * Potongan Biaya (70%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}
}else{
cout <<"=======================================================\n";
cout <<" MAAF ! Data Yang Anda Masukan Tidak Valid \n";
cout <<"=======================================================\n\n";
}

}else if(bu=="UMUM"){
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VVIP : Rp.";cout<<VVIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Jenis Pembayaran : Umum"<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}else{
cout <<"=======================================================\n";
cout <<" MAAF ! Data Yang Anda Masukan Tidak Valid \n";
cout <<"=======================================================\n\n";
}
}else if (rip=="VIP"){
cout <<"Lama Menginap : ";cin>>lmp;cout<<endl;
total=VIP*lmp;
cout <<"_______________________________________________________\n";
cout <<"| Kamar Anda Kelas VIP |\n";
cout <<"|_____________________________________________________|\n";
cout <<"Pembayaran <BPJS/UMUM> : ";cin>>bu;cout<<endl;
if(bu=="BPJS"){
cout <<"_______________________________________________________\n";
cout <<"| SELAMAT DATANG MEMBER BPJS |\n";
cout <<"|_____________________________________________________|\n";
cout <<"| Berikut Kelas BPJS : |\n";
cout <<"| + BPJS Kelas I |\n";
cout <<"| + BPJS Kelas II |\n";
cout <<"| + BPJS Kelas III |\n";
cout <<"|_____________________________________________________|\n";
cout <<"Pilih Kelas BPJS <I/II/II> : ";cin>>bu;cout<<endl;
if(bu=="I"){
if(total>=2000000){
total2=total*0.95;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VIP : Rp.";cout<<VIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas I\n";
cout <<" * Potongan Biaya (95%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<2000000){
total2=total*0.85;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VIP : Rp.";cout<<VIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas I\n";
cout <<" * Potongan Biaya (85%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}

}else if (bu=="II"){
if(total>=1500000){
total2=total*0.80;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VIP : Rp.";cout<<VIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas II\n";
cout <<" * Potongan Biaya (80%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<1500000){
total2=total*0.70;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VIP : Rp.";cout<<VIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas II\n";
cout <<" * Potongan Biaya (70%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}

}else if (bu=="III"){
if(total>=1000000){
total2=total*0.75;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VIP : Rp.";cout<<VIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas III\n";
cout <<" * Potongan Biaya (75%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<1000000){
total2=total*0.70;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VIP : Rp.";cout<<VIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas III\n";
cout <<" * Potongan Biaya (70%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}
}else{
cout <<"=======================================================\n";
cout <<" MAAF ! Data Yang Anda Masukan Tidak Valid \n";
cout <<"=======================================================\n\n";
}

}else if(bu=="UMUM"){
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar VIP : Rp.";cout<<VIP;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Jenis Pembayaran : Umum"<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}else{
cout <<"=======================================================\n";
cout <<" MAAF ! Data Yang Anda Masukan Tidak Valid \n";
cout <<"=======================================================\n\n";
}
}else if (rip=="I"){
cout <<"Lama Menginap : ";cin>>lmp;cout<<endl;
total=I*lmp;
cout <<"_______________________________________________________\n";
cout <<"| Kamar Anda Kelas I |\n";
cout <<"|_____________________________________________________|\n";
cout <<"Pembayaran <BPJS/UMUM> : ";cin>>bu;cout<<endl;
if(bu=="BPJS"){
cout <<"_______________________________________________________\n";
cout <<"| SELAMAT DATANG MEMBER BPJS |\n";
cout <<"|_____________________________________________________|\n";
cout <<"| Berikut Kelas BPJS : |\n";
cout <<"| + BPJS Kelas I |\n";
cout <<"| + BPJS Kelas II |\n";
cout <<"| + BPJS Kelas III |\n";
cout <<"|_____________________________________________________|\n";
cout <<"Pilih Kelas BPJS <I/II/II> : ";cin>>bu;cout<<endl;
if(bu=="I"){
if(total>=2000000){
total2=total*0.95;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar I : Rp.";cout<<I;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas I\n";
cout <<" * Potongan Biaya (95%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<2000000){
total2=total*0.85;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar II : Rp.";cout<<II;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas I\n";
cout <<" * Potongan Biaya (85%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}

}else if (bu=="II"){
if(total>=1500000){
total2=total*0.80;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar I : Rp.";cout<<I;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas II\n";
cout <<" * Potongan Biaya (80%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<1500000){
total2=total*0.70;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar I : Rp.";cout<<I;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas II\n";
cout <<" * Potongan Biaya (70%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}

}else if (bu=="III"){
if(total>=1000000){
total2=total*0.75;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar I : Rp.";cout<<I;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas III\n";
cout <<" * Potongan Biaya (75%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<1000000){
total2=total*0.70;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar I : Rp.";cout<<I;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas III\n";
cout <<" * Potongan Biaya (70%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}
}else{
cout <<"=======================================================\n";
cout <<" MAAF ! Data Yang Anda Masukan Tidak Valid \n";
cout <<"=======================================================\n\n";
}

}else if(bu=="UMUM"){
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar I : Rp.";cout<<I;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Jenis Pembayaran : Umum"<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}else{
cout <<"=======================================================\n";
cout <<" MAAF ! Data Yang Anda Masukan Tidak Valid \n";
cout <<"=======================================================\n\n";
}
}else if (rip=="II"){
cout <<"Lama Menginap : ";cin>>lmp;cout<<endl;
total=II*lmp;
cout <<"_______________________________________________________\n";
cout <<"| Kamar Anda Kelas II |\n";
cout <<"|_____________________________________________________|\n";
cout <<"Pembayaran <BPJS/UMUM> : ";cin>>bu;cout<<endl;
if(bu=="BPJS"){
cout <<"_______________________________________________________\n";
cout <<"| SELAMAT DATANG MEMBER BPJS |\n";
cout <<"|_____________________________________________________|\n";
cout <<"| Berikut Kelas BPJS : |\n";
cout <<"| + BPJS Kelas I |\n";
cout <<"| + BPJS Kelas II |\n";
cout <<"| + BPJS Kelas III |\n";
cout <<"|_____________________________________________________|\n";
cout <<"Pilih Kelas BPJS <I/II/II> : ";cin>>bu;cout<<endl;
if(bu=="I"){
if(total>=2000000){
total2=total*0.95;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar II : Rp.";cout<<II;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas I\n";
cout <<" * Potongan Biaya (95%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<2000000){
total2=total*0.85;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar II : Rp.";cout<<II;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas I\n";
cout <<" * Potongan Biaya (85%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}

}else if (bu=="II"){
if(total>=1500000){
total2=total*0.80;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar II : Rp.";cout<<II;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas II\n";
cout <<" * Potongan Biaya (80%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<1500000){
total2=total*0.70;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar II : Rp.";cout<<II;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas II\n";
cout <<" * Potongan Biaya (70%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}

}else if (bu=="III"){
if(total>=1000000){
total2=total*0.75;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar II : Rp.";cout<<II;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas III\n";
cout <<" * Potongan Biaya (75%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<1000000){
total2=total*0.70;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar II : Rp.";cout<<II;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas III\n";
cout <<" * Potongan Biaya (70%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}
}else{
cout <<"=======================================================\n";
cout <<" MAAF ! Data Yang Anda Masukan Tidak Valid \n";
cout <<"=======================================================\n\n";
}

}else if(bu=="UMUM"){
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar II : Rp.";cout<<II;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Jenis Pembayaran : Umum"<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}else{
cout <<"=======================================================\n";
cout <<" MAAF ! Data Yang Anda Masukan Tidak Valid \n";
cout <<"=======================================================\n\n";
}
}else if (rip=="III"){
cout <<"Lama Menginap : ";cin>>lmp;cout<<endl;
total=III*lmp;
cout <<"_______________________________________________________\n";
cout <<"| Kamar Anda Kelas III |\n";
cout <<"|_____________________________________________________|\n";
cout <<"Pembayaran <BPJS/UMUM> : ";cin>>bu;cout<<endl;
if(bu=="BPJS"){
cout <<"_______________________________________________________\n";
cout <<"| SELAMAT DATANG MEMBER BPJS |\n";
cout <<"|_____________________________________________________|\n";
cout <<"| Berikut Kelas BPJS : |\n";
cout <<"| + BPJS Kelas I |\n";
cout <<"| + BPJS Kelas II |\n";
cout <<"| + BPJS Kelas III |\n";
cout <<"|_____________________________________________________|\n";
cout <<"Pilih Kelas BPJS <I/II/II> : ";cin>>bu;cout<<endl;
if(bu=="I"){
if(total>=2000000){
total2=total*0.95;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar III : Rp.";cout<<III;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas I\n";
cout <<" * Potongan Biaya (95%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<2000000){
total2=total*0.85;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar III : Rp.";cout<<III;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas I\n";
cout <<" * Potongan Biaya (85%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";
}

}else if (bu=="II"){
if(total>=1500000){
total2=total*0.80;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar III : Rp.";cout<<III;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas II\n";
cout <<" * Potongan Biaya (80%) : Rp.";cout<<total2;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<" * Total Yang Harus Dibayar: Rp.";cout<<total3;cout<<endl;
cout <<"-------------------------------------------------------\n\n";
cout <<"=======================================================\n";
cout <<"| Get Well Soon |\n";
cout <<"| Terima Kasih |\n";
cout <<"=======================================================\n";

}else if(total<1500000){
total2=total*0.70;
total3=total-total2; //Biaya setelah didiskon
cout <<"-------------------------------------------------------\n";
cout <<"| DATA DIRI |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Kartu Pengenal : ";cout<<kp;cout<<endl;
cout <<" * No Identitas : ";cout<<id;cout<<endl;
cout <<" * Nama : ";cout<<nm;cout<<endl;
cout <<" * Nama Orang Tua : ";cout<<nmo;cout<<endl;
cout <<" * Alamat : ";cout<<al;cout<<endl;
cout <<" * Jenis Kelamin : ";cout<<jk;cout<<endl;
cout <<" * Usia : ";cout<<us;cout<<endl;
cout <<"-------------------------------------------------------\n";
cout <<"| BIAYA PENGOBATAN |\n";
cout <<"-------------------------------------------------------\n";
cout <<" * Jenis Perawatan : Rawat Inap \n";
cout <<" + Kelas Kamar III : Rp.";cout<<III;cout<<" Per malam\n";
cout <<" - Lama Menginap : ";cout<<lmp;cout<<" Hari\n";
cout <<" * Total Biaya : Rp.";cout<<total;cout<<endl;
cout <<" * Jenis Pembayaran : BPJS Kelas II\n";
cout <<" * Potongan Biaya (70%) : Rp.";cout<<total2;cout<<endl;




Running program


Kondisi 1




Disqus comments