Banyak orang yang berfikir dengan bergelimang materi kita dapat lebih menikmati hidup, pernyataan seperti itu memang masih bisa di perdebatkan. Mari kita analsis saja berdasarkan fakta, contohnya saja ada seorang yang kaya raya dengan harta kekayaan yang dia miliki segala sesuatu benda bisa dia beli. tapi apakah dengan begitu sudah bisa menikmati hidup ? kalau jawabannya iya adalah salah besar.Coba kita bandingkan dengan kehidupan seorang yang cukup sederhana tapi hidupnya serasa tiada beban tentunya contoh yang kedua ini yang lebih cocok di kategorikan menikmati hidup.
Baiklah, ini adalah beberapa tips untuk anda sekalian bagaimana cara menikmati hidup:
- Jangan sekali-sekali turut campur akan urusan orang yang ga ada hubungannya dengan kepentingan kita. Maksudnya jalanin aja kehidupan kita yang sekarang, jangan berkhayal terlalu tinggi, kalo sampe jatuh ya sakit dech
- Patuhi norma-norma serta aturan yang berlaku. Nah klo semua tingkah laku dan perbuatan kita berada di koridor hukum tentunya hati kita akan merasa tentram, coba klo ada salah satu aturan yang kita langgar, lisan sih bisa berkata ah cuek aja, tapi jauh di lubuk hati rasa bersalah pasti ada.
- menyadur dari sedikit ilmu ekonomi, yaitu gunakan skala prioritas, dimana kita harus mendahulukan kepentingan yang lebih penting baru selanjutnya kita kerjakan yang lainnya. contoh kongkretnya kita jangan terus-menerus mengikuti apa yang kita inginkan karena belum tentu apa yang kita inginkan adalah yang kita butuhkan, karena keinginan dan kebutuhan merupakan suatu hal yang berbeda.
mengetes kualitas sound yang sedang di research
refershing bersama teman setelah berkutat dengan rutinitas yang padat
selain itu, penulis juga begitu menikmati rutinitas di luar pekerjaan sehari-hari maupun saat ngampus contohnya servis tv, ya walaupun agak sedikit pusing ya di nkmati saja
nah ini salah satu penyebab kenapa penulis membuat blog, menikmati tugas yang di berikan dari kampus untuk posting c++,,,,,,,
#include<conio.h>
#include<stdio.h>
#include<iomanip.h>
char *grade(char total)
{
if(total>80)
{return "A";}
else if(total>70)
{return "B";}
else if(total>60)
{return "C";}
else if(total>50)
{return "D";}
else
{return "E";}
}
char *makul(char kode[4])
{
if(!strcmp(kode, "151"))
{return "Algoritma dan Pemrogrman 1";}
else if(!strcmp(kode, "422"))
{return "linux 1";}
else if(!strcmp(kode, "733"))
{return "PPN II(Access)";}
else if(!strcmp(kode, "772"))
{return "DBMS";}
}
main()
{
struct
{
char nim[8],nm[20];
int presen,tugas,uts,uas,total;
}nilai[10];
int i,j;
char kode[4];
clrscr();
cout<<"=========================================="<<endl;
cout<<" PROGRAM HITUNG NILAI "<<endl;
cout<<"=========================================="<<endl;
cout<<"Kode Mata Kuliah :";cin>>kode;
cout<<"Jumlah Data Mahaasiswa :";cin>>j;
for(i=1;i<=j;i++)
{
cout<<endl;
cout<<"Data Ke -"<<i<<endl;
cout<<"NIM :";cin>>nilai[i].nim;
cout<<"Nama :";cin>>nilai[i].nm;
cout<<"Nilai Presen1 :";cin>>nilai[i].presen;
cout<<"Nilai Tugas :";cin>>nilai[i].tugas;
cout<<"Nilai UTS :";cin>>nilai[i].uts;
cout<<"Nilai UAS :";cin>>nilai[i].uas;
nilai[i].total=(0.1*nilai[i].presen)+(0.2*nilai[i].tugas)+(0.3*nilai[i].uts)+(0.4*nilai[i].uas);
}
clrscr();
cout<<"Kode Mata Kuliah :"<<kode<<endl;
cout<<"Mata Kuliah :"<<makul(kode)<<endl;
cout<<"==========================================================================="<<endl;
cout<<"No.|NIM |Nama | Nilai |Total |Grade"<<endl;
cout<<" | |Mahasiswa | Presentasi1 | Tugas | UTS | UAS |"<<endl;
cout<<"==========================================================================="<<endl;
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(4)<<i;
cout<<setiosflags(ios::left)<<setw(8)<<nilai[i].nim;
cout<<setiosflags(ios::left)<<setw(14)<<nilai[i].nm;
cout<<setiosflags(ios::left)<<setw(14)<<nilai[i].presen;
cout<<setiosflags(ios::left)<<setw(8)<<nilai[i].tugas;
cout<<setiosflags(ios::left)<<setw(6)<<nilai[i].uts;
cout<<setiosflags(ios::left)<<setw(5)<<nilai[i].uas;
cout<<setiosflags(ios::left)<<setw(9)<<nilai[i].total;
cout<<setiosflags(ios::left)<<setw(5)<<grade(nilai[i].total)<<endl;
}
cout<<"=========================================================================="<<endl;
//cout<<" Jumlah Mahasiswa Lulus : "<< <<endl;
//cout<<" Jumlah Mahasiswa Tidak Lulus : "<< <<endl;
getch();
}
ada hal yang terlewat dipikirkan penulis, dalam menikmati hidup belum disertakan dalam menikmati indahnya romansa kisah cinta karena saat awal memposting dengan judul menikmati hidup ini penulis belum terlalu konsen akan hal percintaan
refershing bersama teman setelah berkutat dengan rutinitas yang padat
selain itu, penulis juga begitu menikmati rutinitas di luar pekerjaan sehari-hari maupun saat ngampus contohnya servis tv, ya walaupun agak sedikit pusing ya di nkmati saja
nah ini salah satu penyebab kenapa penulis membuat blog, menikmati tugas yang di berikan dari kampus untuk posting c++,,,,,,,
soal tipe A
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<iomanip.h>
struct
{char nokomp,jnslyn,*nmlyn;
int tarif,lmasewa,total;}
sewa[15];
long int ttlslr=0;
garis()
{cout<<"================================================="<<endl;}
main()
{
int i,j;
clrscr();
garis();
cout<<" WARNET BINA CYBER"<<endl;
garis();
cout<<"Jumlah Transaksi :";cin>>j;
cout<<endl;
for(i=1;i<=j;i++)
{
cout<<"Transaksi Ke :"<<i<<endl;
cout<<"No. Komputer :";cin>>sewa[i].nokomp;
cout<<"Jenis Layanan :";cin>>sewa[i].jnslyn;
if(sewa[i].jnslyn=='A'||sewa[i].jnslyn=='a')
{sewa[i].nmlyn="Internet";sewa[i].tarif=2500;}
else if(sewa[i].jnslyn=='B'||sewa[i].jnslyn=='b')
{sewa[i].nmlyn="Game Online";sewa[i].tarif=3000;}
else if(sewa[i].jnslyn=='C'||sewa[i].jnslyn=='c')
{sewa[i].nmlyn="Game Offline";sewa[i].tarif=2000;}
else if(sewa[i].jnslyn=='D'||sewa[i].jnslyn=='d')
{sewa[i].nmlyn="Rental Pengetikan";sewa[i].tarif=1500;}
cout<<"Tarif Permenit :"<<sewa[i].tarif<<endl;
cout<<"Durasi Bermain (menit) :";cin>>sewa[i].lmasewa;
sewa[i].total=sewa[i].tarif*sewa[i].lmasewa;
ttlslr=ttlslr+sewa[i].total;
cout<<endl;
}
clrscr();
garis();
cout<<"No. No. Jenis Durasi Tarif Total"<<endl;
cout<<" Komp. Layanan Bermain Permenit "<<endl;
garis();
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(4)<<i;
cout<<setiosflags(ios::left)<<setw(7)<<sewa[i].nokomp;
cout<<setiosflags(ios::left)<<setw(12)<<sewa[i].jnslyn;
cout<<setiosflags(ios::left)<<setw(9)<<sewa[i].lmasewa;
cout<<setiosflags(ios::left)<<setw(12)<<sewa[i].tarif;
cout<<setiosflags(ios::left)<<setw(5)<<sewa[i].total<<endl;
}
garis();
cout<<" Total Keseluruhan :"<<ttlslr<<endl;
//cout<<" Jenis Layanan Paling Banyak:"<< <<endl;
getch();
}
soal tipe B
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<iomanip.h>
garis1()
{cout<<"============================================="<<endl;}
garis2()
{cout<<"============================="<<endl;}
main()
{
class
{
public:
char nm[20];
long int harga,ttlhrg;
int jumbel;
}penj[10];
float subtotal=0,diskon,ppn,grand,ubay,ukem;
char nota;
int i,j;
clrscr();
garis1();
cout<<" SWALAYAN BINA DAGANG"<<endl;
garis1();
cout<<"No. Nota : ";cin>>nota;
cout<<"Jumlah Transaksi : ";cin>>j;
for(i=1;i<=j;i++)
{
cout<<endl;
cout<<"Transaksi ke -"<<i<<endl;
cout<<"Nama Barang : ";gets(penj[i].nm);
cout<<"Harga Satuan : ";cin>>penj[i].harga;
cout<<"Jumlah Beli : ";cin>>penj[i].jumbel;
penj[i].ttlhrg=penj[i].harga*penj[i].jumbel;
cout<<"Total Harga : "<<penj[i].ttlhrg;
subtotal=subtotal+penj[i].ttlhrg;
if(subtotal>180000)
{diskon=0.15*subtotal;}
else if(subtotal>70000)
{diskon=0.05*subtotal;}
else
{diskon=0;}
ppn=0.1*(subtotal-diskon);
grand=(subtotal-diskon)+ppn;
}
clrscr();
cout<<" SWALAYAN BINA DAGANG"<<endl;
cout<<" Jl. Bina Sarana No. 851-OK"<<endl<<endl;
cout<<"Nama Brg @Harga Jml Beli"<<endl;
garis2();
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(12)<<penj[i].nm;
cout<<setiosflags(ios::left)<<setw(8)<<penj[i].harga;
cout<<setiosflags(ios::left)<<setw(8)<<penj[i].jumbel<<endl;
}
garis2();
cout<<" Subtotal : Rp."<<subtotal<<endl;
cout<<" Diskon : Rp."<<diskon<<endl;
cout<<" PPN 10% : Rp."<<ppn<<endl;
cout<<"Grand Total : Rp."<<grand<<endl;
cout<<" Bayar : Rp.";cin>>ubay;
cout<<endl;
ukem=ubay-grand;
cout<<" Kembalian : Rp."<<ukem<<endl<<endl<<endl;
cout<<" Terima Kasih Atas"<<endl;
cout<<" Kunjungan Anda "<<endl;
getch();
}
soal tipe C
#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<iomanip.h>
char *napak(char kode[6])
{
if(!strcmp(kode,"B-01"))
{return "Cheese Burger";}
else if(!strcmp(kode,"B-02"))
{return "Beef Burger";}
else if(!strcmp(kode,"B-SPC"))
{return "Special Burger";}
else if(!strcmp(kode,"P-M"))
{return "Pizza Medium Size";}
else if(!strcmp(kode,"P-S"))
{return "Pizza Small Size";}
else if(!strcmp(kode,"P-SPC"))
{return "Special Pizza";}
else if(!strcmp(kode,"D-C"))
{return "Soft Drink Cola";}
else if(!strcmp(kode,"D-J"))
{return "Soft Drink Juice";}
}
long int hrg(char kode[6])
{
if(!strcmp(kode,"B-01"))
{return 5500;}
else if(!strcmp(kode,"B-02"))
{return 7500;}
else if(!strcmp(kode,"B-SPC"))
{return 11000;}
else if(!strcmp(kode,"P-M"))
{return 24000;}
else if(!strcmp(kode,"P-S"))
{return 9000;}
else if(!strcmp(kode,"P-SPC"))
{return 75500;}
else if(!strcmp(kode,"D-C"))
{return 4500;}
else if(!strcmp(kode,"D-J"))
{return 3500;}
}
main()
{
struct
{
char kode[6];
int jumbel;
long int tohar;
}bp[10];
float subtotal=0,ppn,grand,bayar,kembali;
int i,j;
char nota;
clrscr();
cout<<"===================================================="<<endl;
cout<<" SERDAM BURGER & PIZZA"<<endl;
cout<<"===================================================="<<endl;
cout<<"No. Nota : ";cin>>nota;
cout<<"Jumlah Transaksi : ";cin>>j;
for(i=1;i<=j;i++)
{
cout<<endl;
cout<<"Transaksi Ke-"<<i<<endl;
cout<<"Kode Paket : ";cin>>bp[i].kode;
cout<<"Nama Paket : "<<napak(bp[i].kode)<<endl;
cout<<"Harga Satuan : "<<hrg(bp[i].kode)<<endl;
cout<<"Jumlah Beli : ";cin>>bp[i].jumbel;
bp[i].tohar=hrg(bp[i].kode)*bp[i].jumbel;
cout<<"Total Harga : "<<bp[i].tohar;
subtotal=subtotal+bp[i].tohar;
ppn=0.1*subtotal;
grand=subtotal+ppn;
}
clrscr();
cout<<"===================================================="<<endl;
cout<<"No. Kode Nama Harga Jumlah Total"<<endl;
cout<<" Paket Paket Satuan Beli"<<endl;
cout<<"===================================================="<<endl;
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(4)<<i;
cout<<setiosflags(ios::left)<<setw(6)<<bp[i].kode;
cout<<setiosflags(ios::left)<<setw(19)<<napak(bp[i].kode);
cout<<setiosflags(ios::left)<<setw(7)<<hrg(bp[i].kode);
cout<<setiosflags(ios::left)<<setw(8)<<bp[i].jumbel;
cout<<setiosflags(ios::left)<<setw(5)<<bp[i].tohar<<endl;
}
cout<<"=================================================="<<endl;
cout<<" Subtotal :Rp."<<subtotal<<endl;
cout<<" PPN 10% :Rp."<<ppn<<endl;
cout<<" Grand Total :Rp."<<grand<<endl;
cout<<" Bayar :Rp.";cin>>bayar;
kembali=bayar-grand;
cout<<" Kembalian :Rp."<<kembali;
getch()
}
#include<conio.h>
#include<stdio.h>
#include<iomanip.h>
char *napak(char kode[6])
{
if(!strcmp(kode,"B-01"))
{return "Cheese Burger";}
else if(!strcmp(kode,"B-02"))
{return "Beef Burger";}
else if(!strcmp(kode,"B-SPC"))
{return "Special Burger";}
else if(!strcmp(kode,"P-M"))
{return "Pizza Medium Size";}
else if(!strcmp(kode,"P-S"))
{return "Pizza Small Size";}
else if(!strcmp(kode,"P-SPC"))
{return "Special Pizza";}
else if(!strcmp(kode,"D-C"))
{return "Soft Drink Cola";}
else if(!strcmp(kode,"D-J"))
{return "Soft Drink Juice";}
}
long int hrg(char kode[6])
{
if(!strcmp(kode,"B-01"))
{return 5500;}
else if(!strcmp(kode,"B-02"))
{return 7500;}
else if(!strcmp(kode,"B-SPC"))
{return 11000;}
else if(!strcmp(kode,"P-M"))
{return 24000;}
else if(!strcmp(kode,"P-S"))
{return 9000;}
else if(!strcmp(kode,"P-SPC"))
{return 75500;}
else if(!strcmp(kode,"D-C"))
{return 4500;}
else if(!strcmp(kode,"D-J"))
{return 3500;}
}
main()
{
struct
{
char kode[6];
int jumbel;
long int tohar;
}bp[10];
float subtotal=0,ppn,grand,bayar,kembali;
int i,j;
char nota;
clrscr();
cout<<"===================================================="<<endl;
cout<<" SERDAM BURGER & PIZZA"<<endl;
cout<<"===================================================="<<endl;
cout<<"No. Nota : ";cin>>nota;
cout<<"Jumlah Transaksi : ";cin>>j;
for(i=1;i<=j;i++)
{
cout<<endl;
cout<<"Transaksi Ke-"<<i<<endl;
cout<<"Kode Paket : ";cin>>bp[i].kode;
cout<<"Nama Paket : "<<napak(bp[i].kode)<<endl;
cout<<"Harga Satuan : "<<hrg(bp[i].kode)<<endl;
cout<<"Jumlah Beli : ";cin>>bp[i].jumbel;
bp[i].tohar=hrg(bp[i].kode)*bp[i].jumbel;
cout<<"Total Harga : "<<bp[i].tohar;
subtotal=subtotal+bp[i].tohar;
ppn=0.1*subtotal;
grand=subtotal+ppn;
}
clrscr();
cout<<"===================================================="<<endl;
cout<<"No. Kode Nama Harga Jumlah Total"<<endl;
cout<<" Paket Paket Satuan Beli"<<endl;
cout<<"===================================================="<<endl;
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(4)<<i;
cout<<setiosflags(ios::left)<<setw(6)<<bp[i].kode;
cout<<setiosflags(ios::left)<<setw(19)<<napak(bp[i].kode);
cout<<setiosflags(ios::left)<<setw(7)<<hrg(bp[i].kode);
cout<<setiosflags(ios::left)<<setw(8)<<bp[i].jumbel;
cout<<setiosflags(ios::left)<<setw(5)<<bp[i].tohar<<endl;
}
cout<<"=================================================="<<endl;
cout<<" Subtotal :Rp."<<subtotal<<endl;
cout<<" PPN 10% :Rp."<<ppn<<endl;
cout<<" Grand Total :Rp."<<grand<<endl;
cout<<" Bayar :Rp.";cin>>bayar;
kembali=bayar-grand;
cout<<" Kembalian :Rp."<<kembali;
getch()
}
soal tipe D
#include<iostream.h>#include<conio.h>
#include<stdio.h>
#include<iomanip.h>
char *grade(char total)
{
if(total>80)
{return "A";}
else if(total>70)
{return "B";}
else if(total>60)
{return "C";}
else if(total>50)
{return "D";}
else
{return "E";}
}
char *makul(char kode[4])
{
if(!strcmp(kode, "151"))
{return "Algoritma dan Pemrogrman 1";}
else if(!strcmp(kode, "422"))
{return "linux 1";}
else if(!strcmp(kode, "733"))
{return "PPN II(Access)";}
else if(!strcmp(kode, "772"))
{return "DBMS";}
}
main()
{
struct
{
char nim[8],nm[20];
int presen,tugas,uts,uas,total;
}nilai[10];
int i,j;
char kode[4];
clrscr();
cout<<"=========================================="<<endl;
cout<<" PROGRAM HITUNG NILAI "<<endl;
cout<<"=========================================="<<endl;
cout<<"Kode Mata Kuliah :";cin>>kode;
cout<<"Jumlah Data Mahaasiswa :";cin>>j;
for(i=1;i<=j;i++)
{
cout<<endl;
cout<<"Data Ke -"<<i<<endl;
cout<<"NIM :";cin>>nilai[i].nim;
cout<<"Nama :";cin>>nilai[i].nm;
cout<<"Nilai Presen1 :";cin>>nilai[i].presen;
cout<<"Nilai Tugas :";cin>>nilai[i].tugas;
cout<<"Nilai UTS :";cin>>nilai[i].uts;
cout<<"Nilai UAS :";cin>>nilai[i].uas;
nilai[i].total=(0.1*nilai[i].presen)+(0.2*nilai[i].tugas)+(0.3*nilai[i].uts)+(0.4*nilai[i].uas);
}
clrscr();
cout<<"Kode Mata Kuliah :"<<kode<<endl;
cout<<"Mata Kuliah :"<<makul(kode)<<endl;
cout<<"==========================================================================="<<endl;
cout<<"No.|NIM |Nama | Nilai |Total |Grade"<<endl;
cout<<" | |Mahasiswa | Presentasi1 | Tugas | UTS | UAS |"<<endl;
cout<<"==========================================================================="<<endl;
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(4)<<i;
cout<<setiosflags(ios::left)<<setw(8)<<nilai[i].nim;
cout<<setiosflags(ios::left)<<setw(14)<<nilai[i].nm;
cout<<setiosflags(ios::left)<<setw(14)<<nilai[i].presen;
cout<<setiosflags(ios::left)<<setw(8)<<nilai[i].tugas;
cout<<setiosflags(ios::left)<<setw(6)<<nilai[i].uts;
cout<<setiosflags(ios::left)<<setw(5)<<nilai[i].uas;
cout<<setiosflags(ios::left)<<setw(9)<<nilai[i].total;
cout<<setiosflags(ios::left)<<setw(5)<<grade(nilai[i].total)<<endl;
}
cout<<"=========================================================================="<<endl;
//cout<<" Jumlah Mahasiswa Lulus : "<< <<endl;
//cout<<" Jumlah Mahasiswa Tidak Lulus : "<< <<endl;
getch();
}
soal tipe E
#include<stdio.h>
#include<iomanip.h>
#include<iostream.h>
#include<conio.h>
char *nama(char nip[9])
{
if(!strcmp(nip,"13540121"))
{return "Eva Melinda, S.Kom";}
else if(!strcmp(nip,"13540424"))
{return "Ade Hendini, S.Kom";}
else if(!strcmp(nip,"13540488"))
{return "Deni Maulana, ST";}
else if(!strcmp(nip,"13540773"))
{return "Abduyl Majid, S.Si";}
else if(!strcmp(nip,"13540999"))
{return "Desy R. Sari, M.Msi";}
}
char *gol(char nip[8])
{
if(!strcmp(nip,"13540121"))
{return "I";}
else if(!strcmp(nip,"13540424"))
{return "I";}
else if(!strcmp(nip,"13540488"))
{return "II";}
else if(!strcmp(nip,"13540773"))
{return "II";}
else if(!strcmp(nip,"13540999"))
{return "III";}
}
main()
{
class
{
public:
char nip[9];
int jam,honor,total;
}guru[10];
int i,j;
long int tokes=0;
clrscr();
cout<<"=============================================="<<endl;
cout<<" PROGRAM HITUNG HONORIUM GURU HONORER"<<endl;
cout<<"=============================================="<<endl;
cout<<"Jumlah Data Guru :";cin>>j;
for(i=1;i<=j;i++)
{
cout<<endl;
cout<<"Data ke-"<<i<<endl;
cout<<"NIP : ";cin>>guru[i].nip;
cout<<"Nama : "<<nama(guru[i].nip)<<endl;
cout<<"Golongan : "<<gol(guru[i].nip)<<endl;
if(!strcmp(gol(guru[i].nip),"I"))
{guru[i].honor=15000;}
else if(!strcmp(gol(guru[i].nip),"II"))
{guru[i].honor=26500;}
else if(!strcmp(gol(guru[i].nip),"III"))
{guru[i].honor=88000;}
cout<<"Jumlah Jam Mengajar : ";cin>>guru[i].jam;
guru[i].total=guru[i].honor*guru[i].jam;
tokes=tokes+guru[i].total;
}
clrscr();
cout<<"========================================================================="<<endl;
cout<<"No. NIP Nama Golongan Honor Jam Total"<<endl;
cout<<" Guru mengajar"<<endl;
cout<<"========================================================================="<<endl;
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(4)<<i;
cout<<setiosflags(ios::left)<<setw(9)<<guru[i].nip;
cout<<setiosflags(ios::left)<<setw(20)<<nama(guru[i].nip);
cout<<setiosflags(ios::left)<<setw(12)<<gol(guru[i].nip);
cout<<setiosflags(ios::left)<<setw(10)<<guru[i].honor;
cout<<setiosflags(ios::left)<<setw(12)<<guru[i].jam;
cout<<setiosflags(ios::left)<<setw(5)<<guru[i].total<<endl;
}
cout<<"======================================================================="<<endl;
cout<<" Total Keseluruhan : Rp. "<<tokes<<endl;
//cout<<" Total Honor Tertinggi: RP. "<< <<endl;
//cout<<" Total Honor Terendah : Rp. "<< <<endl;
getch();
}
#include<iomanip.h>
#include<iostream.h>
#include<conio.h>
char *nama(char nip[9])
{
if(!strcmp(nip,"13540121"))
{return "Eva Melinda, S.Kom";}
else if(!strcmp(nip,"13540424"))
{return "Ade Hendini, S.Kom";}
else if(!strcmp(nip,"13540488"))
{return "Deni Maulana, ST";}
else if(!strcmp(nip,"13540773"))
{return "Abduyl Majid, S.Si";}
else if(!strcmp(nip,"13540999"))
{return "Desy R. Sari, M.Msi";}
}
char *gol(char nip[8])
{
if(!strcmp(nip,"13540121"))
{return "I";}
else if(!strcmp(nip,"13540424"))
{return "I";}
else if(!strcmp(nip,"13540488"))
{return "II";}
else if(!strcmp(nip,"13540773"))
{return "II";}
else if(!strcmp(nip,"13540999"))
{return "III";}
}
main()
{
class
{
public:
char nip[9];
int jam,honor,total;
}guru[10];
int i,j;
long int tokes=0;
clrscr();
cout<<"=============================================="<<endl;
cout<<" PROGRAM HITUNG HONORIUM GURU HONORER"<<endl;
cout<<"=============================================="<<endl;
cout<<"Jumlah Data Guru :";cin>>j;
for(i=1;i<=j;i++)
{
cout<<endl;
cout<<"Data ke-"<<i<<endl;
cout<<"NIP : ";cin>>guru[i].nip;
cout<<"Nama : "<<nama(guru[i].nip)<<endl;
cout<<"Golongan : "<<gol(guru[i].nip)<<endl;
if(!strcmp(gol(guru[i].nip),"I"))
{guru[i].honor=15000;}
else if(!strcmp(gol(guru[i].nip),"II"))
{guru[i].honor=26500;}
else if(!strcmp(gol(guru[i].nip),"III"))
{guru[i].honor=88000;}
cout<<"Jumlah Jam Mengajar : ";cin>>guru[i].jam;
guru[i].total=guru[i].honor*guru[i].jam;
tokes=tokes+guru[i].total;
}
clrscr();
cout<<"========================================================================="<<endl;
cout<<"No. NIP Nama Golongan Honor Jam Total"<<endl;
cout<<" Guru mengajar"<<endl;
cout<<"========================================================================="<<endl;
for(i=1;i<=j;i++)
{
cout<<setiosflags(ios::left)<<setw(4)<<i;
cout<<setiosflags(ios::left)<<setw(9)<<guru[i].nip;
cout<<setiosflags(ios::left)<<setw(20)<<nama(guru[i].nip);
cout<<setiosflags(ios::left)<<setw(12)<<gol(guru[i].nip);
cout<<setiosflags(ios::left)<<setw(10)<<guru[i].honor;
cout<<setiosflags(ios::left)<<setw(12)<<guru[i].jam;
cout<<setiosflags(ios::left)<<setw(5)<<guru[i].total<<endl;
}
cout<<"======================================================================="<<endl;
cout<<" Total Keseluruhan : Rp. "<<tokes<<endl;
//cout<<" Total Honor Tertinggi: RP. "<< <<endl;
//cout<<" Total Honor Terendah : Rp. "<< <<endl;
getch();
}
ada hal yang terlewat dipikirkan penulis, dalam menikmati hidup belum disertakan dalam menikmati indahnya romansa kisah cinta karena saat awal memposting dengan judul menikmati hidup ini penulis belum terlalu konsen akan hal percintaan
wah wah merah 2 .... kaya nya lu lagi marah ya.. tp tops brow
BalasHapustest di coba
BalasHapus