Minggu, 07 Oktober 2012

Billing Warnet dengan C++

//Program billing Warnet Fivi__Cink
#include<iostream.h>
struct billing
{
char nama[30];
char no[2];
};
int main ()
{
billing bling;
int menit;int jam;int detik;int w;
int jmlW;
int jmlJ;
int jmlM;
int jmlD;
cout<<"|------------------------------------|"<<endl;
cout<<"| CiNtA.NET |"<<endl;
cout<<"|------------------------------------|"<<endl;
cout<<"Tarif Rp 50,- per 30 detik"<<endl;
cout<<"Masukkan Nama Anda : ";cin.getline(bling.nama,30);
cout<<"Masukkan No. Komputer : ";cin.getline(bling.no,2);
cout<<"=========================="<<endl;
cout<<"Lama Main \n";
cout<<"Masukkan Jam : ";cin>>jam;
cout<<"Masukkan Menit : ";cin>>menit;
cout<<"Masukkan Detik : ";cin>>detik;
jmlJ=(jam*120*50);
jmlM=(menit*100);
jmlD=(detik*50)/30;
jmlW=jmlJ+jmlM+jmlD;
cout<<"Total Pembayaran : Rp."<<jmlW<<",-"<<endl;

cout<<endl;
cout<<"|-------------------------------------------------|"<<endl;
cout<<"|____________________CiNtA.NET____________________|\n";
cout<<"|================< TERIMA KASIH >=================|"<<endl;
cout<<"|=====< KAMI TUNGGU KEDATANGAN ANDA KEMBALI >=====|"<<endl;
cout<<"|-------------------------------------------------|\n \n";

cout<<" _______________________________________\n";
cout<<"|__By.__________________________________|\n";
cout<<"|_______Nama : Nur Khafidhoh_________|\n";
cout<<"|_______NIM : 2011.69.04.0043_______|\n";
cout<<"|_______________________________________|\n";
return 0;
}

output program :



SeMoGA BeRMaNFaAt .....!!!!!!!!!

0 komentar:

Posting Komentar

Template by:

Free Blog Templates