Oke , kaliini saya akan Posting Source Code "Harga Total Belanjaan + Diskon + Member / non member " ;
Oke langsung saja ,,
silakan diliat SC nya ..
silakan diliat SC nya ..
#include <iostream.h>Semoga Bermanfaat :D
void main ()
{
long beli,bayar,diskon ;
char member ;
cout<<"Program Member dan Diskon di Toko "<<endl;
cout<<"=================================="<<endl<<endl;
cout<<"Berapa Total Belanjaan anda ? : " ;
cin>>beli ;
cout<<"Apakah Anda Member ? [Y/N] : ";
cin>>member ;
if (member == 'Y')
{
if (beli > 500000)
{
bayar = (beli * 5) / 100 ;
}
else if (beli >1000000)
{
bayar = (beli * 10) /100;
}
else if (beli >5000000)
{
bayar = (beli *15) / 100 ;
}
else if (beli >10000000)
{
bayar = (beli *20) / 100 ;
}
else if (beli < 500000)
{
bayar = beli ;
goto akhir;
}
diskon = beli - bayar ;
cout<<"Total yang harus dibayar (member) : "<<diskon<<endl;
}
else
{
akhir:
cout<<"Total yang harus dibayar : "<<beli ;
}
cout<<"\n\n\n LabRpl "<<endl;
cout<<"www.rekayasa-perangkat-lunak.info"<<endl;
}
Dear readers, after reading the Content please ask for advice and to provide constructive feedback Please Write Relevant Comment with Polite Language.Your comments inspired me to continue blogging. Your opinion much more valuable to me. Thank you.