Bab 1 No 5

Permasalahan :

Buatlah program yang menampilkan pilihan-pilihan menu dari sebuah restoran atau cafe.

C++ :

#include <iostream>
using namespace std;

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
int pil;
cout<<"Pilihan Menu Cafe Expresso : \n";
cout<<"\t1. Menu Makanan\n";
cout<<"\t2. Menu Minuman\n";
cout<<"Masukkan Pilihan : ";cin>>pil;
switch(pil){
case 1 :
cout<<" Makanan : \n";
cout<<"1. Nasi Goreng \n";
cout<<"2. Mie Goreng/Rebus\n";
cout<<"3. Tempura\n";
cout<<"4. Kentang Goreng\n";
cout<<"5. Roti Baka\n";
break;
case 2 :
cout<<" Minuman : \n";
cout<<"1. Juice Jeruk\n";
cout<<"2. Juice Alpukat\n";
   cout<<"3. Juice Apel\n";
   cout<<"4. Juice Tomat\n";
cout<<"5. Milkshake Vanila/Coklat\n";
break;
}
return 0;
}

Output :



Raptor :


Share this

Related Posts

Previous
Next Post »