switch - case
İçindekiler
#include <cstdlib>
#include <iostream>
#include <conio.h>
using namespace std;
void RandevuAlma(){
cout<<"Burasi randevu alma bolumu";
}
int main(int argc, char *argv[])
{
do{
cout<<"n[R] Randevu Al";
cout<<"n[L] Randevu Listesi";
cout<<"n[ESC] Cikisn";
switch(_getch()){
case 'r':
case 'R': RandevuAlma(); break;
case 'l':
case 'L': cout<<"nRandevu Alma Bolumu";break;
case 27:return 0;break;
default: cout <<"nLutfen bir Menu Harfi giriniz"; break;
}
_getch();
system("cls");
}while(1);
system("PAUSE");
return EXIT_SUCCESS;
}
#include <iostream>
#include <conio.h>
using namespace std;
void RandevuAlma(){
cout<<"Burasi randevu alma bolumu";
}
int main(int argc, char *argv[])
{
do{
cout<<"n[R] Randevu Al";
cout<<"n[L] Randevu Listesi";
cout<<"n[ESC] Cikisn";
switch(_getch()){
case 'r':
case 'R': RandevuAlma(); break;
case 'l':
case 'L': cout<<"nRandevu Alma Bolumu";break;
case 27:return 0;break;
default: cout <<"nLutfen bir Menu Harfi giriniz"; break;
}
_getch();
system("cls");
}while(1);
system("PAUSE");
return EXIT_SUCCESS;
}