#include <iostream.h>This called by "Membuat Menu di c++" in indonesian. wohoooo :D
#include <conio.h>
void main() {
int menu,a,b,c;
char jawab[20];
do{
cout<<"Silakan dipilih.."<<endl;
cout<<"1. Segitiga"<<endl;
cout<<"2. Segiempat"<<endl;
cout<<"Pilihan : ";
cin>>menu;
clrscr();
switch (menu) {
case 1: cout<< "Menghitung Segitiga"<<endl;
cout <<"Alas : ";
cin>>a;
cout <<"Tinggi : ";
cin>>b;
cout<< "Luas : "<<(0.5*a*b);
break;
case 2: cout<< "Menghitung Segiempat"<<endl;
cout <<"Panjang : ";
cin>>a;
cout <<"Lebar : ";
cin>>b;
cout<< "Luas : "<<a*b;
cout<<"Lanjut [Y/T] ? ";
cin>>jawab;
default : cout << "Makan tu Menu"<<endl;
}
}while(jawab=="T");
getch();
}
Sign up here with your email
ConversionConversion EmoticonEmoticon