Selasa, 15 Maret 2011

Posting Pertemuan Pertama

Program Menu Restoran

#include <cstdlib>
#include <iostream>

using namespace std;

int main(int argc, char *argv[])
{
    int pil_1;//*lihat menu makanan*
char pil_2;//*pesan makanan *
char pil_3;//*masukan minuman*
float A=10000;//*harga 1 porsi gule ayam *
float B=17000;//*harga 1 porsi sate kambing *
float C=15000;//*harga 1 porsi ikan bakar *
float D=5000;//*harga 1 porsi nasi goreng*
float E=3000;//*harga 1 gelas jus apel*
float F=3000;//*harga 1 gelas jus mangga*
float G=3500;//*harga 1 gelas jus avokat*
float H=1000;//*harga 1 gelas air putih*
float I=1500;//*harga 1 gelas teh hangat*
float jml_m1;//*jumlah makanan yang dipesan*
float jml_m2;//*jumlah minuman yang di pesan*
float total_1;
float total_2;
char back;
char lagi;
atas :

//clrscr();
cout<<"\t\t\t ****************************\n";
cout<<"\t\t\t *****PROGRAM RESTAURANT*****\n";
cout<<"\t\t\t ****************************\n\n";

cout<<"1.lihat menu makanan & minuman\n";
cout<<"2.transaksi\n";
cout<<"3.laporan\n\n";
cout<<"masukan pilihan anda : ";
cin>>pil_1;
if (pil_1==1)
{
//clrscr ();
cout<<"\t\tSEDIA MAKANAN & MINUMAN:\n\n";
cout<<"makanan dan minuman harga\n";
cout<<"************************************************\n";
cout<<"a)gule ayam terbang Rp.10.000,_ /porsi\n";
cout<<"b)sate kambing mbek Rp.17.000,_ /porsi\n";
cout<<"c)ikan bakar merah Rp.15.000,_ /porsi\n";
cout<<"d)nasi goreng tempur Rp. 5.000,_ /porsi\n";
cout<<"e)jus apel Rp. 3.000,_ /gelas\n";
cout<<"f)jus mangga Rp. 3.000,_ /gelas\n";
cout<<"g)jus avokat Rp. 3.500,_ /gelas\n";
cout<<"h)air putih Rp. 1.000,_ /gelas\n";
cout<<"i)teh hanggat Rp. 1.000,_ /gelas\n\n";
cout<<"anda ingin pesan (Y & T) :";
cin>>back;
switch (back)
{
case 'Y' :
case 'y' :
goto atas;
//getch();
}
}


if (pil_1==2)
{
//clrscr ();
cout<<"masukan nomer makanan pilihan anda :";
cin>>pil_2;
switch(pil_2)
{
case 'A' :
case 'a' :
//clrscr ();
cout<<"jenis makanan yang anda pilih : \n";
cout<<"gule ayam terbang\n";
cout<<"harga : Rp.10.000,_ \n";
cout<<"masukan jumlah makanan : ";
cin>>jml_m1;
total_1=(jml_m1*A);
cout<<"\ntotal harga makanan = Rp."< cout<<",_";
break;

case 'B' :
case 'b' :
//clrscr ();
cout<<"jenis makanan yang anda pilih : \n";
cout<<"sate kambing mbek\n";
cout<<"harga : Rp.17.000,_ \n";
cout<<"masukan jumlah makanan : ";
cin>>jml_m1;
total_1=(jml_m1*B);
cout<<"\ntotal harga makanan = Rp."< cout<<",_";
break;

case 'C' :
case 'c' :
//clrscr ();
cout<<"jenis makanan yang anda pilih : \n";
cout<<"ikan bakar merah\n";
cout<<"harga : Rp.15.000,_ \n";
cout<<"masukan jumlah makanan : ";
cin>>jml_m1;
total_1=(jml_m1*C);
cout<<"\ntotal harga makanan = Rp."< cout<<",_";
break;

case 'D' :
case 'd' :
//clrscr ();
cout<<"jenis makanan yang anda pilih : \n";
cout<<"nasi goreng tempur\n";
cout<<"harga : Rp. 5.000,_ \n";
cout<<"masukan jumlah makanan : ";
cin>>jml_m1;
total_1=(jml_m1*D);
cout<<"\ntotal harga makanan = Rp."< cout<<",_";
break;
}

cout<<"\nAnda ingin pesan lagi [Y atau T]=";
//lagi = getche() ;
if (lagi == 'Y' || lagi == 'y')
goto atas;
//getch();


}


    system("PAUSE");
    return EXIT_SUCCESS;
}

0 komentar:

Posting Komentar

 
Free Flash TemplatesRiad In FezFree joomla templatesAgence Web MarocMusic Videos OnlineFree Website templateswww.seodesign.usFree Wordpress Themeswww.freethemes4all.comFree Blog TemplatesLast NewsFree CMS TemplatesFree CSS TemplatesSoccer Videos OnlineFree Wordpress ThemesFree CSS Templates Dreamweaver