#include
<conio.h>
#include
<iostream.h>
main()
{
int JA, MA,
DA, JR, MR, DR, DS, MS, JS;
long int total,
tarif, bayar, kembali;
char id_user[25];
cout<<"\n Nusantara Net ";
cout<<"\n Jl.kebun raya No. 20 Jakarta ";
cout<<"\n ****************************************************************";
cout<<"\n Struk pembayara";
cout<<"\n ID user : ";cin>>id_user;
cout<<"\n Awal
:"; cin>> JA;cout<<" : "; cin>> MA;cout<<"
: "; cin>>DA;
cout<<"\n Akhir
:"; cin>> JR;cout<<" : "; cin>> MR;cout<<"
: "; cin>>DR;
DS=0; MS=0; JS=0; MS;
DS=DS+(DR-DA);
if (DS<0)
{
DS=DS+60;
MS=-1;
}
MS=MS+(MR-MA);
if (MS<0)
{
MS=MS+60;
JS=-1 ;
}
JS=JS+(JR-JA);
if (JS<0)
{
JS=JS+24 ;
}
total=(JS*3600)+ (MS*60) +DS;
cout<<"\n selisih
: "<<JS<<" : "<<MS<<" :
"<<DS;
cout<<"\n Pulsa
: ";cin>>tarif;
total= tarif*total;
cout<<"\n total
: Rp. "<<total;
cout<<"\n Bayar
: Rp. ";cin>>bayar;
kembali= bayar-total;
cout<<"\n Kembali
: Rp. "<<kembali;
cout<<"\n ****************************************************************";
cout<<"\n Terima Kasih ";
getch();
}
Tidak ada komentar:
Posting Komentar