This is default featured slide 1 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 2 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 3 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 4 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

This is default featured slide 5 title

Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.

Selasa, 21 Maret 2017

Minuman

#include <stdio.h>
#include <conio.h>
#include <iostream.h>

main()
{
char kode[3], jawab, *jenis;
float diskon;
long harga, jumbel, total, jumlah_harga;

menu:
cout<<"               -=TOKOH MINUMAN JANSEN=-          \n\n "<<endl;
cout<<"==================================================="<<endl;
cout<<"        | Kode |  Jenis Minuman |   Harga   |\n "<<endl;
cout<<"==================================================="<<endl;
cout<<"        |  1   |     Milo       | Rp. 10000 |\n"<<endl;
cout<<"        |  2   |     Kopi       | Rp. 3000  |\n"<<endl;
cout<<"        |  3   |   Teh Manis    | Rp. 2500  |\n"<<endl;
cout<<"        |  4   |     Jus        | Rp. 5000  |\n"<<endl;
cout<<"---------------------------------------------------"<<endl;
cout<<endl<<endl;
cout<<" Masukan Kode angka (1-4)  : "; cin>>kode;

if(strcmpi(kode,"1")==0)
{
jenis="Milo";
harga=10000;
}
else
if(strcmpi(kode,"2")==0)
{
jenis="Kopi";
harga=3000;
}
else
if(strcmpi(kode,"3")==0)
{
jenis="Teh Manis";
harga=2500;
}
else
if(strcmpi(kode,"4")==0)
{
jenis="Jus";
harga=5000;
}
else
{
jenis="-MAAF ANDA SALAH KODE-";
}


cout<<" Jenis Minuman             : "<<jenis<<endl;
cout<<" Harga Minuman (Rp)        : "<<harga<<endl;
cout<<" Jumlah Beli               : "; cin>>jumbel;

//Proses Jumlah Harga
jumlah_harga=harga*jumbel;
cout<<" Jumlah Harga (Rp)         : "<<jumlah_harga<<endl;

if(jumlah_harga>=100000)
{ diskon = 0.15 * jumlah_harga ;
}
else
{ diskon =0 ;
}

cout<<" Diskon (Rp)               : "<<diskon<<endl;

//Proses Total
total=jumlah_harga-diskon;
cout<<" Total Harga (Rp)          : "<<total<<endl;
getch();

cout<<endl<<endl;
cout<<"Kembali Ke Menu atau Keluar [Y/N] = "; cin>>jawab;
if(jawab=='Y'||jawab=='y')
{clrscr();
goto menu;
}
else
if(jawab=='N'||jawab=='n')
{
goto exit;
}

exit:
}



BERIKUT HASIL CODING TERSEBUT